home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / file / managers / mc-3.2 / mc-3 / mc-3.2.1 / doc / mc.sgml < prev    next >
Encoding:
SGML Document  |  1996-05-17  |  94.5 KB  |  2,414 lines

  1. <!--
  2.   This is Linuxdoc-sgml source for GNU Midnight Commander documentation.
  3.   In order to compile this into different formats, you have to use
  4.   linuxdoc-sgml utilities by Matt Welsh with a small patch for MC's sake.
  5.  
  6.   Note for those who will write this:
  7.   Special characters ([ ] \ < > " | $ ~ # %) bring some troubles and should
  8.   be written with care. Here is a key for using them:
  9.   Character(s) 
  10.    to achieve   |  Normal use  |  Inside tag (tag, em, tt, etc.)  |  Verbatim
  11.      [             [            [                          [
  12.      ]             ]            ]                          ]
  13.      \               &bslsh;           &bslshd;                     &bslshv;
  14.      <               <              <                            <
  15.      >               >              >                            >
  16.      </              &etago;           &etago;                       &etago;
  17.      "               &dquot;           &dquot;                         "
  18.      |               |          |                        |
  19.      $               $          $                        $
  20.      ~               ˜           ˜                         ~
  21.      #               #             #                           #
  22.      %               %          %                        %
  23.  
  24.   Inside tag means between either <tag> and </tag>, <em> </em>, <tt> </tt>,
  25.   <bf> </bf> and some others (you have to check this by creating a manual
  26.   page and see if the \ is there correctly).
  27.   Verbatim means anywhere between <code> </code> and <verb> </verb>.
  28.   -->
  29. <!doctype linuxdoc system>
  30.  
  31. <article>
  32.  
  33. <mantitle title="mc" sectnum="1" date="16 September 1995" name="mc - Visual shell for Unix-like systems">
  34. <title>GNU Midnight Commander User's Guide
  35. <author>Written by the Midnight Commander developement team <tt/mc-devel@nuclecu.unam.mx/
  36. <date>v 3.0, 16 September 1995
  37. <abstract>
  38. This document describes how to use the GNU Midnight Commander, Unix file manager.
  39. </abstract>
  40.  
  41. <toc>
  42.  
  43. <sect>Usage<label id="Usage">
  44.  
  45. <p>
  46. <tt/mc/ [-bcCdfhPNstuUVx?] [dir1 [dir2]]
  47. [-v file]  [-l file&rsqb
  48.  
  49. <sect>Description<label id="Description">
  50.  
  51. <p>
  52. The Midnight Commander is a directory browser/file manager
  53. for Unix-like operating systems.
  54.  
  55. <sect>Options<label id="Options">
  56.  
  57. <p>
  58. <descrip>
  59. <tag/-b/ Forces black and white display.
  60. <tag/-c/ Force color mode, please check the section <lnk name="Colors" id="Colors"> for
  61. more information.
  62. <tag/-C arg/ Use to specify a different color set in the
  63. command line. The format of arg is documented in the
  64. <lnk name="Colors" id="Colors"> section.
  65. <tag/-d/ Disables mouse support.
  66. <tag/-f/ Displays the compiled-in search paths for Midnight
  67. Commander files.
  68. <tag/-l file/ Save the ftpfs dialog with the server on file.
  69. <tag/-P/ At program end, the Midnight Commander will print the
  70. last working directory; this, along with the shell
  71. function below, will allow you to browse through your
  72. directories and automatically move to the last directory
  73. you were in (thanks to Torben Fjerdingstad and Sergey for
  74. contributing this function and the code which implements
  75. this option).
  76.  
  77. <tscreen><verb>
  78.  
  79. bash and zsh users:
  80.  
  81. mc ()
  82. {
  83.         MC=/tmp/mc$$-"$RANDOM"
  84.         @prefix@/bin/mc -P "$@" > "$MC"
  85.         cd `cat "$MC"`
  86.         rm "$MC"
  87.         unset MC;
  88. }
  89.  
  90. tcsh usres:
  91. alias mc 'setenv MC `@prefix@/bin/mc -P \!*`; cd $MC; unsetenv MC'
  92.  
  93. </verb></tscreen>
  94. I know the bash function could be shorter for zsh and bash but the
  95. backquotes on bash won't accept that you suspend the program with
  96. C-z. 
  97.  
  98. <tag/-s/ Turns on the slow terminal mode, in this mode the
  99. program will not draw expensive line drawing characters
  100. and will toggle verbose mode off.
  101. <tag/-t/ Used only if the code was compiled with Slang and
  102. terminfo: it makes the Midnight Commander use the value of
  103. the <tt/TERMCAP/ variable for the terminal information instead
  104. of the information on the system wide terminal database
  105. <tag/-u/ Disables the use of a concurrent shell (only makes
  106. sense if the Midnight Commander has been built with
  107. concurrent shell support).
  108. <tag/-v file/Enters the internal viewer to view the file specified.
  109. <tag/-U/ Enables the use of the concurrent shell support (only
  110. makes sense if the Midnight Commander was built with the
  111. subshell support set as an optional feature).
  112. <tag/-V/ Displays the version of the program.
  113. <tag/-x/ Forces xterm mode. Used when running on xterm-capable
  114. terminals (two screen modes, and able to send mouse escape sequences).
  115. </descrip>
  116. If specified, the first path name is the directory to show
  117. in the selected panel; the second path name is the
  118. directory to be shown in the other panel.
  119.  
  120. <sect>Overview<label id="Overview">
  121.  
  122. <p>
  123. The screen of the Midnight Commander is divided into four
  124. parts. Almost all of the screen space is taken up by two
  125. directory panels. By default, the second bottommost line
  126. of the screen is the shell command line, and the bottom
  127. line shows the function key labels. The topmost line is
  128. the <lnk name="menu bar line" id="Menu Bar">. The menu bar line may not be visible,
  129. but appears if you click the topmost line with the mouse
  130. or press the F9 key.
  131.  
  132. The Midnight Commander provides a view of two directories
  133. at the same time. One of the panels is the current panel
  134. (a selection bar is in the current panel). Almost all
  135. operations take place on the current panel. Some file
  136. operations like Rename and Copy by default use the
  137. directory of the unselected panel as a destination (don't
  138. worry, they always ask you for confirmation first). For
  139. more information, see the sections on the <lnk name="Directory
  140. Panels" id="Directory Panels">, the <lnk name="Left and Right Menus" id="Left and Right Menus"> and the <lnk name="File Menu" id="File Menu">.
  141.  
  142. You can execute system commands from the Midnight
  143. Commander by simply typing them. Everything you type will
  144. appear on the shell command line, and when you press Enter
  145. the Midnight Commander will execute the command line you
  146. typed; read the <lnk name="Shell Command Line" id="Shell Command Line"> and <lnk name="Input Line Keys" id="Input Line Keys">
  147. sections to learn more about the command line.
  148.  
  149. <sect>Mouse Support<label id="Mouse Support">
  150.  
  151. <p>
  152. The Midnight Commander comes with mouse support. It is
  153. activated whenever you are running on an <bf/xterm(1)/ terminal
  154. (it even works if you take a telnet or rlogin connection
  155. to another machine from the xterm) or if you are running
  156. on a Linux console and have the <bf/gpm(1)/ mouse server running.
  157.  
  158. When you left click on a file in the directory panels,
  159. that file is selected; if you click with the right button,
  160. the file is marked (or unmarked, depending on the previous
  161. state).
  162.  
  163. Double-clicking on a file will try to execute the command
  164. if it is an executable program; and if the
  165. <lnk name="extension file" id="Extension File Edit">
  166. has a program specified for the file's extension, the
  167. specified program is executed.
  168.  
  169. Also, it is possible to execute the commands assigned to
  170. the function key labels by clicking on them.
  171.  
  172. If a mouse button is clicked on the top frame line of the
  173. directory panel, it is scrolled one pageful backward.
  174. Correspondingly, a click on the bottom frame line will
  175. cause a scroll of one pageful forward. This frame line
  176. method works also in the <lnk name="Help Viewer" id="How to use help"> and the
  177. <lnk name="Directory Tree" id="Directory Tree">.
  178.  
  179. The default auto repeat rate for the mouse buttons is 400
  180. milliseconds. This may be changed to other values by
  181. editing the <lnk name=".mc.ini" id="Save Setup"> file and changing the
  182. <em/mouse_repeat_rate/ parameter.
  183.  
  184. If you are running the Commander with the mouse support,
  185. you can bypass the Commander and get the default mouse
  186. behaviour (cutting and pasting text) by holding down the
  187. Shift key.
  188.  
  189. <sect>Keys<label id="Keys">
  190.  
  191. <p>
  192. Some commands in the Midnight Commander involve the use of
  193. the <em/Control/ (sometimes labeled CTRL or CTL) and the <em/Meta/
  194. (sometimes labeled ALT or even Compose) keys. In this
  195. manual we will use the following abbreviations:
  196.  
  197. C-<em/chr/ means hold the Control key while typing the
  198. character <em/chr/. Thus C-f would be: hold the Control key
  199. and type f.
  200.  
  201. M-<em/chr/ means hold the Meta or Alt key down while typing
  202. <em/chr/. If there is no Meta or Alt key, type ESC, release
  203. it, then type the character <em/chr/.
  204.  
  205. All input lines in the Midnight Commander use an
  206. approximation to the GNU Emacs editor's key bindings.
  207.  
  208. There are many sections which tell about the keys. The
  209. following are the most important.
  210.  
  211. The <lnk name="File Menu" id="File Menu"> section documents
  212. the keyboard shortcuts for the commands appearing in the File menu.
  213. This section
  214. includes the function keys. Most of these commands perform
  215. some action, usually on the selected file or the tagged
  216. files.
  217.  
  218. The <lnk name="Directory Panels" id="Directory Panels">
  219. section documents the keys which
  220. select a file or tag files as a target for a later action
  221. (the action is usually one from the file menu).
  222.  
  223. The <lnk name="Shell Command Line" id="Shell Command Line">
  224. section list the keys which are
  225. used for entering and editing command lines. Most of these
  226. copy file names and such from the directory panels to the
  227. command line (to avoid excessive typing) or access the
  228. command line history.
  229.  
  230. <lnk name="Input Line Keys" id="Input Line Keys">
  231. are used for editing input lines. This
  232. means both the command line and the input lines in the
  233. query dialogs.
  234.  
  235. <sect1>Miscellaneous Keys<label id="Miscellaneous Keys">
  236.  
  237. <p>
  238. Here are some keys which don't fall into any of the other
  239. categories:
  240.  
  241. <descrip>
  242. <tag/Enter/ If there is some text in the command line (the one
  243. at the bottom of the panels), then that command is
  244. executed. If there is no text in the command line then if
  245. the selection bar is over a directory the Midnight
  246. Commander does a <bf/chdir(2)/ to the selected directory and
  247. reloads the information on the panel; if the selection is
  248. an executable file then it is executed. Finally, if the
  249. extension of the selected file name matches one of the
  250. extensions in the <lnk name="extensions file" id="Extension File Edit"> then the corresponding
  251. command is executed.
  252. <tag/C-l/ Repaint all the information in the Midnight
  253. Commander.
  254. <tag/C-x c/ Run the <lnk name="Chmod" id="Chmod"> command on a file or on the tagged
  255. files.
  256. <tag/C-x o/ Run the <lnk name="Chown" id="Chown"> command on the current file or on the
  257. tagged files.
  258. <tag/C-x l/ Run the link command.
  259. <tag/C-x s/ Run the symbolic link command.
  260. <tag/C-x C-l/ Create symbolic link to the selection in the current panel at
  261. the place specified in the dialog (defaults to a symlink in the other
  262. panel's directory), using a relative shortest possible symlink.
  263. <tag/C-x i/ Set the other panel display mode to information.
  264. <tag/C-x q/ Set the other panel display mode to quick view.
  265. <tag/C-x !/ Execute the <lnk name="External panelize" id="External panelize"> command.
  266. <tag/C-x h/ Run the <lnk name="add directory to hotlist" id="Hotlist"> command.
  267. <tag/M-!/ Executes the Filtered view command, described in the
  268. <lnk name="view command" id="Internal File Viewer">.
  269. <tag/M-?/ Executes the <lnk name="Find file" id="Find File"> command.
  270. <tag/M-c/ Pops up the <lnk name="quick cd" id="Quick cd"> dialog.
  271. <tag/C-o/ When the program is being run in the Linux console or
  272. under an xterm, it will show you the output of the
  273. previous command. When ran on the Linux console, the
  274. Midnight Commander uses an external program (<bf/cons.saver/)
  275. to handle saving and restoring of information on the
  276. screen.
  277. When the subshell support is compiled in, you can type <tt/C-o/
  278. at any time and you will be taken back to the Midnight
  279. Commander main screen, to return to your application just
  280. type <tt/C-o/. If you have an application suspended by using
  281. this trick, you won't be able to execute other programs
  282. from the Midnight Commander until you terminate the
  283. supended application.
  284. </descrip>
  285.  
  286. <sect1>Directory Panels<label id="Directory Panels">
  287.  
  288. <p>
  289. This section lists the keys which operate on the directory
  290. panels. If you want to know how to change the appearance
  291. of the panels take a look at the section on <lnk name="Left and Right
  292. Menus" id="Left and Right Menus">.
  293.  
  294. <descrip>
  295. <tag/Tab, C-i/ Change the current panel. The old other panel
  296. becomes the new current panel and the old current panel
  297. becomes the new other panel. The selection bar moves from
  298. the old current panel to the new current panel.
  299. <tag/Insert, C-t/ To tag files you may use the Insert key (the
  300. kich1 terminfo sequence) or the <tt/C-t/ (Control-t) sequence.
  301. To untag files, just retag a tagged file.
  302. <tag/M-g, M-h (or M-r), M-j/ Used to select the top file in a
  303. panel, the middle file and the bottom one, respectively.
  304. <tag/C-s, M-s/ Start a filename search in the directory
  305. listing. When the search is active the keypresses will be
  306. added to the search string instead of the command line. If
  307. the <em/Show mini-status/ option is enabled the search string
  308. is shown on the mini-status line. When typing, the
  309. selection bar will move to the next file starting with the
  310. typed letters. The <tt/backspace/ or <tt/DEL/ keys can be used to
  311. correct typing mistakes. If <tt/C-s/ is pressed again, the next
  312. match is searched for.
  313. <tag/C-&bslshd; (control-backslash)/ Show the
  314. <lnk name="directory hotlist" id="Hotlist"> and change to the selected
  315. directory.
  316. <tag/+ (plus)/ This is used to select (tag) a group of files.
  317. The Midnight Commander will prompt for a regular
  318. expression describing the group. When <em/Shell Patterns/ are
  319. enabled, the regular expression is much like the regular
  320. expressions in the shell (* standing for zero or more
  321. characters and ? standing for one character). 
  322. If <em/Shell Patterns/ is off, then the tagging of files is done with
  323. normal regular expressions (see <bf/ed (1)/).
  324. If the expression starts or ends with a slash (<tt>/</tt>), then it
  325. will select directories instead of files.
  326. <tag/&bslshd; (backslash)/ Use the "&bslsh;" key to unselect a group of
  327. files. This is the opposite of the Plus key.
  328. <tag/up-key, C-p/ Move the selection bar to the previous entry
  329. in the panel.
  330. <tag/down-key, C-n/ Move the selection bar to the next entry in
  331. the panel.
  332. <tag/home, a1, M-</ Move the selection bar to the first entry
  333. in the panel.
  334. <tag/end, c1, M->/ Move the selection bar to the last entry in
  335. the panel.
  336. <tag/next-page, C-v/ Move the selection bar one page down.
  337. <tag/prev-page, M-v/ Move the selection bar one page up.
  338. <tag/M-o/ If the other panel is a listing panel and you are
  339. standing on a directory in the current panel, then the
  340. other panel contents are set to the contents of the
  341. currently selected directory (like Emacs' dired C-o key)
  342. otherwise the other panel contents are set to the parent
  343. dir of the current dir.
  344. <tag/C-PageUp, C-PageDown/ Only when ran on the Linux console:
  345. does a chdir to &dquot;..&dquot; and to the currently selected
  346. directory respectively.
  347. </descrip>
  348.  
  349. <sect1>Shell Command Line<label id="Shell Command Line">
  350.  
  351. <p>
  352. This section lists keys which are useful to avoid
  353. excessive typing when entering shell commands.
  354.  
  355. <descrip>
  356. <tag/M-Enter/ Copy the currently selected file name to the
  357. command line.
  358. <tag/C-Enter/ Same a M-Enter, this one only works on the Linux
  359. console.
  360. <tag/M-Tab/ Does the filename, command, variable, username and
  361. hostname <lnk name="completion" id="Completion"> for you.
  362. <tag/C-x t, C-x C-t/ Copy the tagged files (or if there are no
  363. tagged files, the selected file) of the current panel (<tt/C-x t/) 
  364. or of the other panel (<tt/C-x C-t/) to the command line.
  365. <tag/C-x p, C-x C-p/ The first key sequence copies the current
  366. path name to the command line, and the second one copies
  367. the unselected panel's path name to the command line.
  368. <tag/C-x r, C-x C-r/ Copy value of current symlink (or current symlink
  369. in the other panel) to the command line.
  370. <tag/C-q/ The quote command can be used to insert characters
  371. that are otherwise interpreted by the Midnight Commander
  372. (like the <tt/+/ symbol).
  373. <tag/M-p, M-n/ Use these keys to browse through the command
  374. history. M-p takes you to the last entry, M-n takes you to
  375. the next one.
  376. </descrip>
  377.  
  378. <sect1>General Movement Keys<label id="General Movement Keys">
  379.  
  380. <p>
  381. The help viewer, the file viewer and the directory tree
  382. use common code to handle moving. Therefore they accept
  383. exactly the same keys. Each of them also accepts some keys
  384. of its own.
  385.  
  386. Other parts of the Midnight Commander use some of the same
  387. movement keys, so this section may be of use for those
  388. parts too.
  389.  
  390. <descrip>
  391. <tag/Up, C-p/ Moves one line backward.
  392. <tag/Down, C-n/ Moves one line forward.
  393. <tag/Prev Page, Page Up, M-v/ Moves one pageful backward.
  394. <tag/Next Page, Page Down, C-v/ Moves one pageful forward.
  395. <tag/Home, A1/ Moves to the beginning.
  396. <tag/End, C1/ Move to the end.
  397. </descrip>
  398.  
  399. The help viewer and the file viewer accept the following
  400. keys in addition the to ones mentioned above:
  401.  
  402. <descrip>
  403. <tag/b, C-b, C-h, Backspace, Delete/ Moves one pageful
  404. backward.
  405. <tag/Space bar/ Moves one pageful forward.
  406. <tag/u, d/ Moves one half of a page backward or forward.
  407. <tag/g, G/ Moves to the beginning or to the end.
  408. </descrip>
  409.  
  410. <sect1>Input Line Keys<label id="Input Line Keys">
  411.  
  412. <p>
  413. The input lines (they are used for the <lnk name="command line" id="Shell Command Line"> and
  414. for the query dialogs in the program) accept these keys:
  415.  
  416. <descrip>
  417. <tag/C-a/ puts the cursor at the beginning of line.
  418. <tag/C-e/ puts the cursor at the end of the line.
  419. <tag/C-b, move-left/ move the cursor one position left.
  420. <tag/C-f, move-right/ move the cursor one position right.
  421. <tag/M-f/ moves one word forward.
  422. <tag/M-b/ moves one word backward.
  423. <tag/C-h, backspace/ delete the previous character.
  424. <tag/C-d, Delete/ delete the character in the point (over the
  425. cursor).
  426. <tag/C-@/ sets the mark for cutting.
  427. <tag/C-w/ copies the text between the cursor and the mark to a
  428. kill buffer and removes the text from the input line.
  429. <tag/M-w/ copies the text between the cursor and the mark to a
  430. kill buffer.
  431. <tag/C-y/ yanks back the contents of the kill buffer.
  432. <tag/C-k/ kills the text from the cursor to the end of the line.
  433. <tag/M-p, M-n/ Use these keys to browse through the command
  434. history. <tt/M-p/ takes you to the last entry, <tt/M-n/ takes you to
  435. the next one.
  436. <tag/M-C-h, M-Backspace/ delete one word backward.
  437. <tag/M-Tab/ does the filename, command, variable, username and
  438. hostname <lnk name="completion" id="Completion"> for you.
  439. </descrip>
  440.  
  441. <sect>Menu Bar<label id="Menu Bar">
  442.  
  443. <p>
  444. The menu bar pops up when you press F9 or click the mouse
  445. on the top row of the screen. The menu bar has five menus:
  446. <em/Left/, <em/File/, <em/Command/, <em/Options/ and <em/Right/.
  447.  
  448. The <lnk name="Left and Right Menus" id="Left and Right Menus"> allow you to modify the
  449. appearance of the left and right directory panels.
  450.  
  451. The <lnk name="File Menu" id="File Menu"> lists the actions you can perform on the
  452. currently selected file or the tagged files.
  453.  
  454. The <lnk name="Command Menu" id="Command Menu"> lists the actions which are more general
  455. and bear no relation to the currently selected file or the
  456. tagged files.
  457.  
  458. <sect1>Left and Right Menus<label id="Left and Right Menus">
  459.  
  460. <p>
  461. The outlook of the directory panels can be changed from
  462. the <bf/Left/ and <bf/Right/ menus.
  463.  
  464. <sect2>Listing Mode...<label id="Listing Mode...">
  465.  
  466. <p>
  467. The listing mode view is used to display a listing of
  468. files, there are four different listing modes available:
  469. <bf/Full/, <bf/Brief/, <bf/Long/ and <bf/User/. The full directory view shows
  470. the file name, the size of the file and the modification
  471. time.
  472.  
  473. The brief view shows only the file name and it has two
  474. columns (therefore showing twice as many files as other
  475. views). The long view is similar to the output of <tt/ls -l/
  476. command. The long view takes the whole screen width.
  477.  
  478. If you choose the <bf/User/ display format, then you have to
  479. specify the display format.
  480.  
  481. The user display format must start with a panel size
  482. specifier. This may be <tt/half/ or <tt/full/, and they specify
  483. a half screen panel and a full screen panel respectively.
  484.  
  485. After the panel size, you may specify the two columns mode
  486. on the panel, this is done by adding the number <tt/2/ to the
  487. user format string.
  488.  
  489. After this you add the name of the fields with an optional
  490. size specifier. This are the available fields you may
  491. display:
  492.  
  493. <descrip>
  494. <tag/name/ displays the file name.
  495. <tag/size/ displays the file size.
  496. <tag/type/ displays a one character field type. This character
  497. is a superset of what is displayed by ls with the <em/-F/ flag.
  498. An asterisk for executable files, a slash for directories,
  499. an at-sign for links, an equal sign for sockets, a hyphen
  500. for character devices, a plus sign for block devices, a
  501. pipe for fifos, a tilde for symbolic links to directories
  502. and an exlamation mark for stalled symlinks (links that
  503. point nowhere).
  504. <tag/mtime/ file's last modification time.
  505. <tag/atime/ file's last access time.
  506. <tag/ctime/ file's creation time.
  507. <tag/perm/ a string representing the current permission bits of
  508. the file.
  509. <tag/mode/ an octal value with the current permission bits of
  510. the file.
  511. <tag/nlink/ the number of links to the file.
  512. <tag/ngid/ the GID (numeric).
  513. <tag/nuid/ the UID (numeric).
  514. <tag/owner/ the owner of the file.
  515. <tag/group/ the group of the file.
  516. <tag/inode/ the inode of the file.
  517. </descrip>
  518.  
  519. Also you may use these field names for arranging the
  520. display:
  521.  
  522. <descrip>
  523. <tag/space/ a space in the display format.
  524. <tag/mark/ An asterisk if the file is tagged, a space if it's not.
  525. <tag/|/ This character is used to add a vertical line to the
  526. display format.
  527. </descrip>
  528.  
  529. To force one field to a fixed size (a size specifier), you
  530. just add a <tt/:/ and then the number of characters you want
  531. the field to have, if the number is followed by the symbol
  532. <tt/+/, then the size specifies the minimum field size, if
  533. the program finds out that there is more space on the
  534. screen, it will then expand this field.
  535.  
  536. For example, the <bf/Full/ display corresponds to this format:
  537.  
  538. <tscreen><verb>
  539. half type,name,|,size,|,mtime
  540. </verb></tscreen>
  541.  
  542. And the <bf/Long/ display corresponds to this format:
  543.  
  544. <tscreen><verb>
  545. full perm,space,nlink,space,owner,space,group,space,
  546.      size,space,mtime,space,name
  547. </verb></tscreen>
  548.  
  549. This is a nice user display format:
  550.  
  551. <tscreen><verb>
  552. half name,|,size:7,|,type,mode:3
  553. </verb></tscreen>
  554.  
  555. Panels may also be set to the following modes:
  556.  
  557. <descrip>
  558. <tag/Info/ The info view display information related to the
  559. currently selected file and if possible information about
  560. the current file system.
  561. <tag/Tree/ The tree view is quite similar to the <lnk name="directory
  562. tree" id="Directory Tree"> feature. See the section about it for more
  563. information.
  564. <tag/Quick View/ In this mode, the panel will switch to a
  565. reduced <lnk name="viewer" id="Internal File Viewer"> that displays the contents of the
  566. currently selected file, if you select the panel (with the
  567. tab key or the mouse), you will have access to the usual
  568. viewer commands.
  569. </descrip>
  570.  
  571. <sect2>Sort Order...<label id="Sort Order...">
  572.  
  573. <p>
  574. The eight sort orders are by name, by extension, by
  575. modification time, by access time, and by inode
  576. information modification time, by size, by inode and
  577. unsorted. In the Sort order dialog box you can choose the
  578. sort order and you may also specify if you want to sort in
  579. reverse order by checking the reverse box.
  580.  
  581. By default directories are sorted before files but this
  582. can be changed from the <lnk name="Options menu" id="Options Menu">
  583. (option <em/"Mix all files"/).
  584.  
  585. <sect2>Filter...<label id="Filter...">
  586.  
  587. <p>
  588. The filter command allows you to specify a shell pattern
  589. (for example <tt/*.tar.gz/) which the files must match to be
  590. shown. Regardless of the filter pattern, the directories
  591. and the links to directories are always shown in the
  592. directory panel.
  593.  
  594. <sect2>Reread<label id="Reread">
  595.  
  596. <p>
  597. The reread command reload the list of files in the
  598. directory. It is useful if other processes have created or
  599. removed files. If you have panelized file names in a panel
  600. this will reload the directory contents and remove the
  601. panelized information (See the section <lnk name="External panelize" id="External panelize">
  602. for more information).
  603.  
  604. <sect1>File Menu<label id="File Menu">
  605.  
  606. <p>
  607. The Midnight Commander uses the F1 - F10 keys as keyboard
  608. shortcuts for commands appearing in the file menu. The
  609. escape sequences for the Fkeys are terminfo capabilities
  610. <tt/kf1/ trough <tt/kf10/. On terminals without function key
  611. support, you can achieve the same functionality by
  612. pressing the <tt/ESC/ key and then a number in the range 1
  613. through 9 and 0 (corresponding to F1 to F9 and F10
  614. respectively).
  615.  
  616. The File menu has the following commands (keyboard
  617. shortcuts in parentheses):
  618.  
  619. <descrip>
  620. <tag/Help (F1)/ Invokes the built-in hypertext help viewer. Inside the
  621. <lnk name="help viewer" id="How to use help">, you can use the Tab key to select the next
  622. link and the Enter key to follow that link. The keys Space
  623. and Backspace are used to move forward and backward in a
  624. help page. Press F1 again to get the full list of accepted
  625. keys.
  626. <tag/Menu (F2)/ Invoke the <lnk name="user menu" id="Menu File Edit">.
  627. The user menu provides an easy way
  628. to provide users with a menu and add extra features to the
  629. Midnight Commander.
  630. <tag/View (F3, Shift-F3)/ View the currently selected file.
  631. By default this invokes
  632. the <lnk name="Internal File Viewer" id="Internal File Viewer"> but if the option
  633. <em/Use internal view/ is off, it invokes an external file viewer specified
  634. by the <tt/PAGER/ environment variable. If <tt/PAGER/ is undefined,
  635. the <bf/view/ command is invoked. If you use <tt/Shift-F3/
  636. instead, the viewer will be invoked without doing any
  637. formatting or pre processing to the file.
  638. <tag/Filtered View (M-!)/ this command prompts for a command and it's arguments (the
  639. argument defaults to the currently selected file name),
  640. the output from such command is shown in the internal file
  641. viewer.
  642. <tag/Edit (F4)/ Currently it invokes the <tt/vi/ editor or the editor
  643. specified in the <tt/EDITOR/ environment variable.
  644. <tag/Copy (F5)/ Pop up an input dialog with destination that defaults to
  645. the directory in the non-selected panel and copies the
  646. currently selected file (or the tagged files, if there is
  647. at least one file tagged) to the directory specified by
  648. the user in the input dialog. During this process, you can
  649. press C-c or ESC to abort the operation. For details about
  650. source mask (which will be usually either * or ^&bslsh;(.*&bslsh;)$
  651. depending on setting of Use shell patterns) and possible
  652. wildcards in the destination see <lnk name="Mask copy/rename" id="Mask Copy/Rename">.
  653. <tag/Link (C-x l)/ Create a hard link to the current file.
  654. <tag/SymLink (C-x s)/ Create a symbolic link to the current file. To those of
  655. you who don't know what links are: creating a link to a
  656. file is a bit like copying the file, but both the source
  657. filename and the destination filename represent the same
  658. file image. For example, if you edit one of these files,
  659. all changes you make will appear in both files. Some
  660. people call links aliases or shortcuts.
  661. A hard link appears as a real file. After making it, there
  662. is no way of telling which one is the original and which
  663. is the link. If you delete either one of them the other
  664. one is still intact. It is very difficult to notice that
  665. the files represent the same image. Use hard links when
  666. you don't even want to know.
  667. A symbolic link is a reference to the name of the original
  668. file. If the original file is deleted the symbolic link is
  669. useless. It is quite easy to notice that the files
  670. represent the same image. The Midnight Commander shows an
  671. <em/@/-sign in front of the file name if it is a symbolic
  672. link to somewhere (except to directory, where it shows a
  673. tilde (<em/˜/)). The original file which the link points to is
  674. shown on mini-status line if the <em/Show mini-status/ option
  675. is enabled. Use symbolic links when you want to avoid the
  676. confusion that can be caused by hard links.
  677. <tag/Edit sYmlink C-x C-s/ Lets you edit the value of the current symbolic
  678. link (i.e. the absolute/relative path the symlink points to).
  679. <tag>Rename/Move (F6)</tag> Pop up an input dialog that
  680. defaults to the directory in
  681. the non-selected panel and moves the currently selected
  682. file (or the tagged files if there is at least one tagged
  683. file) to the directory specified by the user in the input
  684. dialog. During the process, you can press C-c or ESC to
  685. abort the operation. For more details look at Copy
  686. operation above, most of the things are quite similar.
  687. <tag/Mkdir (F7)/ Pop up an input dialog and creates the directory
  688. specified.
  689. <tag/Delete (F8)/ Delete the currently selected file or the tagged files in
  690. the currently selected panel. During the process, you can
  691. press <tt/C-c/ or <tt/ESC/ to abort the operation.
  692. <tag/Quick cd (M-c)/ Use the <lnk name="quick cd" id="Quick cd"> command if you have full
  693. command line and want to cd somewhere.
  694. <tag/Select group (+)/ This is used to select (tag) a group of files. The
  695. Midnight Commander will prompt for a regular expression
  696. describing the group. When <em/Shell Patterns/ are enabled,
  697. the regular expression is much like the filename globbing
  698. in the shell (<tt/*/ standing for zero or more characters and <tt/?/
  699. standing for one character). If <em/Shell Patterns/ is off,
  700. then the tagging of files is done with normal regular
  701. expressions (see <bf/ed (1)/).
  702. To mark directories instead of files, the expression must
  703. start or end with a <tt>/</tt>.
  704. <tag/Unselect group (&bslshd;)/ Used for unselecting a group of files.
  705. This is the opposite of the <em/Select group/ command.
  706. <tag/Quit (F10, Shift-F10)/ Terminate the Midnight Commander.
  707. <tt/Shift-F10/ is used when you want to quit and you are using the shell wrapper.
  708. <tt/Shift-F10/ will not take you to the last directory you
  709. visited with the Midnight Commander, instead it will stay
  710. at the directory where you started the Midnight Commander.
  711. </descrip>
  712.  
  713. <sect2>Quick cd<label id="Quick cd">
  714.  
  715. <p>
  716. This command is useful if you have a full command line and
  717. want to <lnk name="cd" id="The cd internal command"> somewhere without
  718. having to yank and paste the command line. This command pops up a
  719. small dialog,
  720. where you enter everything you would enter after <tt/cd/ on
  721. the command line and then you press enter. This features
  722. all the things that are already in the <lnk name="internal cd
  723. command" id="The cd internal command">.
  724.  
  725. <sect1>Command Menu<label id="Command Menu">
  726.  
  727. <p>
  728. The <lnk name="Directory tree" id="Directory Tree"> command shows a tree figure of the
  729. directories.
  730.  
  731. The <lnk name="Find file" id="Find File"> command allows you to search for a specific
  732. file. The "Swap panels" command swaps the contents of the
  733. two directory panels.
  734.  
  735. The <bf>Panels on/off</bf> command shows the output of the last
  736. shell command. This works only on <bf/xterm/ and on Linux
  737. console.
  738.  
  739. The <bf/Compare directories (C-x d)/ command compares the
  740. directory panels with each other. You can then use the
  741. <bf/Copy (F5)/ command to make the panels identical. There are
  742. two comparison methods. The quick method compares only file
  743. size and file date. The thorough method makes a full
  744. byte-by-byte compare. The thorough method is not available
  745. if the machine does not support the <bf/mmap(2)/ system call.
  746.  
  747. The <bf/Command history/ command shows a list of typed
  748. commands. The selected command is copied to the command
  749. line. The command history can also be accessed by typing
  750. <tt/M-p/ or <tt/M-n/.
  751.  
  752. The <lnk name="Directory hotlist" id="Hotlist"> (C-&bslsh;) command makes changing of the
  753. current directory to often used directories faster.
  754.  
  755. The <lnk name="External panelize" id="External panelize"> allows you to execute an external
  756. program, and make the output of that program the contents
  757. of the current panel.
  758.  
  759. <lnk name="Extension file edit" id="Extension File Edit"> command allows you to specify
  760. programs to executed when you try to execute, view, edit
  761. and do a bunch of other thing on files with certain
  762. extensions (filename endings). The <lnk name="Menu file edit" id="Menu File Edit">
  763. command may be used for editing the user menu (which
  764. appears by pressing <tt/F2/).
  765.  
  766. <sect2>Directory Tree<label id="Directory Tree">
  767.  
  768. <p>
  769. The Directory Tree command shows a tree figure of the
  770. directories. You can select a directory from the figure
  771. and the Midnight Commander will change to that directory.
  772.  
  773. There are two ways to invoke the tree. The real directory
  774. tree command is available from Commands menu. The other
  775. way is to select tree view from the Left or Right menu.
  776.  
  777. To get rid of long delays the Midnight Commander creates
  778. the tree figure by scanning only a small subset of all the
  779. directories. If the directory which you want to see is
  780. missing, move to its parent directory and press <tt/C-r/ (or
  781. <tt/F2/).
  782.  
  783. You can use the following keys:
  784.  
  785. <lnk name="General movement keys" id="General Movement Keys"> are accepted.
  786.  
  787. <descrip>
  788. <tag/Enter/ In the directory tree, exits the directory tree and
  789. changes to this directory in the current panel. In the
  790. tree view, changes to this directory in the other panel
  791. and stays in tree view mode in the current panel.
  792. <tag/C-r, F2 (Rescan)/ Rescan this directory. Use this when the
  793. tree figure is out of date: it is missing subdirectories
  794. or shows some subdirectories which don't exist any more.
  795. <tag/F3 (Forget)/ Delete this directory from the tree figure.
  796. Use this to remove clutter from the figure. If you want
  797. the directory back to the tree figure press <tt/F2/ in its
  798. parent directory.
  799. <tag>F4 (Static/Dynamic)</tag> Toggle between the dynamic navigation
  800. mode (default) and the static navigation mode.
  801. In the static navigation mode you can use the Up and Down
  802. keys to select a directory. All known directories are
  803. shown.
  804. In the dynamic navigation mode you can use the Up and Down
  805. keys to select a sibling directory, the Left key to move
  806. to the parent directory, and the Right key to move to a
  807. child directory. Only the parent, sibling and children
  808. directories are shown, others are left out. The tree
  809. figure changes dynamically as you traverse.
  810. <tag/F5 (Copy)/ Copy the directory.
  811. <tag/F6 (RenMov)/ Move the directory.
  812. <tag/F7 (Mkdir)/ Make a new directory below this directory.
  813. <tag/F8 (Delete)/ Delete this directory from the file system.
  814. <tag/C-s, M-s/ Search the next directory matching the search
  815. string. If there is no such directory these keys will move
  816. one line down.
  817. <tag/C-h, Backspace/ Delete the last character of the search
  818. string.
  819. <tag/Any other character/ Add the character to the search
  820. string and move to the next directory which starts with
  821. these characters. In the tree view you must first activate
  822. the search mode by pressing <tt/C-s/. The search string is
  823. shown in the mini status line.
  824. </descrip>
  825.  
  826. The following actions are available only in the directory
  827. tree. They aren't supported in the tree view.
  828.  
  829. <descrip>
  830. <tag/F1 (Help)/ Invoke the help viewer and show this section.
  831. <tag/Esc, F10/ Exit the directory tree. Do not change the
  832. directory.
  833. </descrip>
  834.  
  835. The mouse is supported. A double-click behaves like <tt/Enter/.
  836. See also the section on <lnk name="mouse support" id="Mouse Support">.
  837.  
  838. <sect2>Find File<label id="Find File">
  839.  
  840. <p>
  841. The Find File feature first asks for the start directory
  842. for the search and the filename to be searched for. By
  843. pressing the Tree button you can select the start
  844. directory from the <lnk name="directory tree" id="Directory Tree"> figure. You can start
  845. the search by pressing the Ok button.
  846.  
  847. During the search you can stop from the Stop button and
  848. continue from the Start button.
  849.  
  850. You can browse the filelist with the up and down arrow
  851. keys. The <em/Chdir/ button will change to the directory of the
  852. currently selected file. The <em/Again/ button will ask for the
  853. parameters for a new search. The <em/Quit/ button quits the
  854. search operation. The <em/Panelize/ button will place the found
  855. files to the current directory panel so that you can do
  856. additional operations on them (view, copy, move, delete
  857. and so on). After panelizing you can press <tt/C-r/ to return
  858. to the normal file listing.
  859.  
  860. It is possible to have a list of directories that the Find File
  861. command should skip during the search (for example, you may want to
  862. avoid searches on a CDROM or on a NFS directory that is mounted across
  863. a slow link).
  864.  
  865. Directories to be skipped should be set on the variable
  866. <tt/find_ignore_dirs/ in the  <tt/Misc/ section of your <tt/.mc.ini/ file.
  867.  
  868. Directory components should be separated with a colon, here is an
  869. example: 
  870.  
  871. <tscreen><verb>
  872. [Misc]
  873. find_ignore_dirs=/cdrom:/nfs/wuarchive:/afs
  874. </verb></tscreen>
  875.  
  876. You may consider using the <lnk name="External panelize" id="External panelize"> command
  877. instead. <bf/Find file command/ is for simple queries only,
  878. while using <bf/External panelize/ you can do as mysterious
  879. searches as you would like.
  880.  
  881. <sect2>External panelize<label id="External panelize">
  882.  
  883. <p>
  884. The External panelize allows you to execute an external
  885. program, and make the output of that program the contents
  886. of the current panel.
  887.  
  888. For example, if you want to manipulate in one of the
  889. panels all the symbolic links in the current directory,
  890. you can use external panelization to run the following
  891. command:
  892.  
  893. <tscreen><verb>
  894. find . -type l -print
  895. </verb></tscreen>
  896.  
  897. Upon command completion, the directory contents of the
  898. panel will no longer be the directory listing of the
  899. current directory, but all the files that are symbolic
  900. links.
  901.  
  902. If you want to panelize all of the files that have been
  903. downloaded from your ftp server, you can use this awk
  904. command to extract the file name from the transfer log
  905. files:
  906.  
  907. <tscreen><verb>
  908. awk '$9 ~! /incoming/ { print $9 }' < /usr/adm/xferlog
  909. </verb></tscreen>
  910.  
  911. You may want to save often used panelize commands under a
  912. descriptive name, so that you can recall them quickly. You
  913. do this by typing the command on the input line and
  914. pressing Add new button. Then you enter a name under which
  915. you want the command to be saved. Next time, you just
  916. choose that command from the list and do not have to type
  917. it again.
  918.  
  919. <sect2>Hotlist<label id="Hotlist">
  920.  
  921. <p>
  922. The Directory hotlist command shows the labels of the
  923. directories in the directory hotlist. The Midnight
  924. Commander will change to the directory corresponding to
  925. the selected label. From the hotlist dialog, you can
  926. remove already created label/directory pairs and add new
  927. one. For adding you may want to use a standalone Add to
  928. hotlist command (<tt/C-x h/), which adds the current directory
  929. into the directory hotlist, as well. The user is prompted
  930. for a label for the directory.
  931.  
  932. This makes cd to often used directories faster. You may also
  933. consider using the <tt/CDPATH/ variable as described in
  934. <lnk name="internal cd command" id="The cd internal command"> description.
  935.  
  936. <sect2>Extension File Edit<label id="Extension File Edit">
  937.  
  938. <p>
  939. This will invoke your editor on the file <tt>˜/.mc.ext</tt>. The
  940. format of this file is as follows (the format has changed
  941. with version 3.0):
  942.  
  943. All lines starting with <tt/#/ or empty lines are thrown away.
  944.  
  945. Lines starting in the first column should have following
  946. format:
  947.  
  948. <tt>keyword/descNL</tt>, i.e. everything after <tt>keyword/</tt> until new
  949. line is <tt/desc/
  950.  
  951. <tt/keyword/ can be:
  952.  
  953. <em/shell/ (desc is then any extension (no wildcars), i.e.
  954. matches all the files *desc. Example: .tar matches *.tar)
  955.  
  956. <em/regex/ (desc is a regular expression)
  957.  
  958. <em/type/ (file matches this if `file %f` matches regular
  959. expression desc (the filename: part from `file %f` is
  960. removed))
  961.  
  962. <em/default/ (matches any file no matter what desc is)
  963.  
  964. Other lines should start with a space or tab and should be
  965. of the format:
  966.  
  967. <tt/keyword=commandNL/ (with no spaces around =), where <tt/keyword/
  968. should be:
  969.  
  970. <em/Open/ (if the user presses Enter or doubleclicks it), <em/View/
  971. (F3), <em/Edit/ (F4), <em/Drop/ (user drops some files on it) or any
  972. other user defined name (those will be listed in the
  973. extension dependent pop-up menu). <em/Icon/ name is reserved
  974. for future use by mc.
  975.  
  976. <tt/command/ is any one-line shell command, with the simple
  977. <lnk name="macro substitution" id="Macro Substitution">.
  978.  
  979. Target are evaluated from top to bottom (order is thus
  980. important). If some actions are missing, search continues
  981. as if this target didn't match (i.e. if a file matches the
  982. first and second entry and View action is missing in the
  983. first one, then on pressing F3 the View action from the
  984. second entry will be used. default should catch all the
  985. actions.
  986.  
  987. <sect2>Menu File Edit<label id="Menu File Edit">
  988.  
  989. <p>
  990. The user menu is a menu of useful actions that can be
  991. customized by the user. When you access the user menu, the
  992. file <tt>˜/.mc.menu</tt> is used if it exists, and otherwise mc
  993. uses the default system-wide menu <tt>@prefix@/lib/mc/mc.menu</tt>.
  994.  
  995. The format of the menu file is very simple. Lines that
  996. start with anything but space or tab are considered
  997. entries for the menu (in order to be able to use it like a
  998. hot key, the first character should be a letter). All the
  999. lines that start with a space or a tab are the commands
  1000. that will be executed when the entry is selected.
  1001.  
  1002. When an option is selected all the command lines of the
  1003. option are copied to a temporary file in the temporary
  1004. directory (usually <tt>/usr/tmp</tt>) and then that file is
  1005. executed. This allows the user to put normal shell
  1006. constructs in the menus. Also simple macro substitution
  1007. takes place before executing the menu code. For more
  1008. information, see <lnk name="macro substitution" id="Macro Substitution">.
  1009.  
  1010. Here is a sample mc.menu file:
  1011.  
  1012. <tscreen><verb>
  1013. A    Dump the currently selected file
  1014.     od -c %f
  1015.  
  1016. B    Edit a bug report and send it to root
  1017.     vi /tmp/mail.$$
  1018.     mail -s "Midnight Commander bug" root < /tmp/mail.$$
  1019.  
  1020. M    Read mail
  1021.     emacs -f rmail
  1022.  
  1023. N    Read Usenet news
  1024.     emacs -f gnus
  1025.  
  1026. H    Call the info hypertext browser
  1027.     info
  1028.  
  1029. J    Copy current directory to other panel recursively
  1030.     tar cf - . | (cd %D && tar xvpf -)
  1031.  
  1032. K    Make a release of the current subdirectory
  1033.     echo -n "Name of distribution file: "
  1034.     read tar
  1035.     ln -s %d `dirname %d`/$tar 
  1036.     cd ..
  1037.     tar cvhf ${tar}.tar $tar
  1038.  
  1039. = f *.tar.gz | f *.tgz & t n
  1040. X       Extract the contents of a compressed tar file
  1041.     tar xzvf %f
  1042. </verb></tscreen>
  1043.  
  1044. <bf/Default Conditions/
  1045.  
  1046. Each menu entry may be preceded by a condition. The
  1047. condition must start from the first column with a <tt/=/
  1048. character. If the condition is true, the menu entry will
  1049. be the default entry.
  1050.  
  1051. <tscreen><verb>
  1052. Condition syntax:
  1053.   <cond>          = <sub-cond>
  1054.   or:          = <cond> | <cond> ...
  1055.   or:          = <cond> & <cond> ... 
  1056. </verb></tscreen>
  1057.  
  1058. Sub-condition is one of following:
  1059.  
  1060. <tscreen><verb>
  1061. f <pattern>    current file matching pattern
  1062. F <pattern>    other file matching pattern
  1063. d <pattern>    current directory matching pattern
  1064. D <pattern>    other directory matching pattern
  1065. t <type>    current file of type
  1066. T <type>    other file of type
  1067. ! <sub-cond>    negate the result of sub-condition
  1068. </verb></tscreen>
  1069.  
  1070. Pattern is a normal shell pattern or a regular expression,
  1071. according to the shell patterns option. You can override
  1072. the global value of the shell patterns option by writing
  1073. <tt/shell_patterns=x/ on the first line of the menu file
  1074. (where "x" is either 0 or 1).
  1075.  
  1076. Type is one or more of the following characters:
  1077.  
  1078. <itemize>
  1079. <item><tt/n/ not directory
  1080. <item><tt/r/ regular file
  1081. <item><tt/d/ directory
  1082. <item><tt/l/ link
  1083. <item><tt/c/ char special
  1084. <item><tt/b/ block special
  1085. <item><tt/f/ fifo
  1086. <item><tt/s/ socket
  1087. <item><tt/x/ executable
  1088. <item><tt/t/ tagged
  1089. </itemize>
  1090.  
  1091. For example <tt/rlf/ means either regular file, link or fifo.
  1092. The <tt/t/ type is a little special because it acts on the
  1093. panel instead of the file. The condition <tt/=t t/ is true if
  1094. there are tagged files in the current panel and false if
  1095. not.
  1096.  
  1097. If the condition starts with <tt/=?/ instead of <tt/=/ a debug
  1098. trace will be shown whenever the value of the condition is
  1099. calculated.
  1100.  
  1101. The conditions are calculated from left to right. This
  1102. means
  1103.  
  1104. <tscreen><verb>
  1105.     = f *.tar.gz | f *.tgz & t n
  1106. </verb></tscreen>
  1107.  
  1108. is calculated as
  1109.  
  1110. <tscreen><verb>
  1111.     ( (f *.tar.gz) | (f *.tgz) ) & (t n)
  1112. </verb></tscreen>
  1113.  
  1114. Here is a sample of the use of conditions:
  1115.  
  1116. <tscreen><verb>
  1117. = f *.tar.gz | f *.tgz & t n
  1118. L    List the contents of a compressed tar-archive
  1119.     gzip -cd %f | tar xvf -
  1120. </verb></tscreen>
  1121.  
  1122. <bf/Addition Conditions/
  1123.  
  1124. If the condition begins with <tt/+/ (or <tt/+?/) instead of <tt/=/
  1125. (or <tt/=?/) it is an addition condition. If the condition is
  1126. true the menu entry will be included in the menu. If the
  1127. condition is false the menu entry will not be included in
  1128. the menu.
  1129.  
  1130. You can combine default and addition conditions by
  1131. starting condition with <tt/+=/ or <tt/=+/ (or <tt/+=?/ or <tt/=+?/ if
  1132. you want debug trace). If you want to use two different
  1133. conditions, one for adding and another for defaulting, you
  1134. can precede a menu entry with two condition lines, one
  1135. starting with <tt/+/ and another starting with <tt/=/.
  1136.  
  1137. Comments are started with <tt/#/. The additional comment
  1138. lines must start with <tt/#/, space or tab.
  1139.  
  1140. <sect1>Options Menu<label id="Options Menu">
  1141.  
  1142. <p>
  1143. The <lnk name="Configuration" id="Configuration"> command pops up a dialog from which you
  1144. can change most of settings of the Midnight Commander.
  1145.  
  1146. The <lnk name="Display bits" id="Display bits"> command pops up a dialog from which you
  1147. may select which characters is your terminal able to
  1148. display.
  1149.  
  1150. The <lnk name="Confirmation" id="Confirmation"> command pops up a dialog from which you
  1151. specify which actions you want to confirm.
  1152.  
  1153. The <lnk name="Learn keys" id="Learn keys"> command pops up a dialog from which you
  1154. test some keys which are not working on some terminals and
  1155. you may fix them.
  1156.  
  1157. The <lnk name="Virtual FS" id="Virtual FS"> command pops up a dialog from which you
  1158. specify some VFS related options.
  1159.  
  1160. The <lnk name="Layout" id="Layout"> command pops up a dialog from which you specify
  1161. a bunch of options how mc looks like on the screen.
  1162.  
  1163. The <lnk name="Save setup" id="Save Setup"> command saves the current settings of the
  1164. Left, Right and Options menus. A small number of other
  1165. settings is saved, too.
  1166.  
  1167. <sect2>Configuration<label id="Configuration">
  1168.  
  1169. <p>
  1170. The program has some options that may be toggled on and
  1171. off from the Configuration dialog. Options are enabled if
  1172. they have an asterisk or "x" in front of them. These
  1173. options are divided into three groups: Screen Colors,
  1174. Panel Options and Other Options.
  1175.  
  1176. <bf/Screen Colors/ You can select whether your display supports color or not.
  1177. Normally this information is in the terminfo database. If
  1178. you want to know how to change individual colors see the
  1179. section on <lnk name="Colors" id="Colors">.
  1180.  
  1181. <bf/Panel Options/
  1182.  
  1183. <descrip>
  1184. <tag/Show Backup Files/ By default the Midnight Commander
  1185. doesn't show files ending in '˜' (like GNU's <tt/ls/ option
  1186. <tt/-B/).
  1187. <tag/Show Hidden Files/ By default the Midnight Commander will
  1188. show all files that start with a dot (like <tt/ls -a/).
  1189. <tag/Mark moves down/ By default when you mark a file (with
  1190. either <tt/C-t/ or the Insert key) the selection bar will move
  1191. down.
  1192. <tag/Show Mini-Status/ If enabled, show one line of status
  1193. information at the bottom of the panels about the
  1194. currently selected item.
  1195. <tag/Mix all files/ When this option is enabled, all files and
  1196. directories are shown mixed together. If the option is
  1197. off, directories (and links to directories) are shown at
  1198. the beginning of the listing, and other files afterwards.
  1199. <tag/Fast directory reload/ This option is off by default. If
  1200. you activate the fast reload, the Midnight Commander will
  1201. use a trick to determine if the directory contents have
  1202. changed. The trick is to reload the directory only if the
  1203. i-node of the directory has changed; this means that
  1204. reloads only happen when files are created or deleted. If
  1205. what changes is the i-node for a file in the directory
  1206. (file size changes, mode or owner changes, etc) the
  1207. display is not updated. In these cases, if you have the
  1208. option on, you have to rescan the directory manually (with
  1209. <tt/C-r/).
  1210. </descrip>
  1211.  
  1212. <bf/Other Options/
  1213.  
  1214. <descrip>
  1215. <tag/Verbose operation/ This toggles whether the file Copy,
  1216. Rename and Delete operations are verbose (i.e. display a
  1217. dialog box for each operation). If you have a slow
  1218. terminal, you may wish to disable the verbose operation.
  1219. It is automatically turned off if the speed of your
  1220. terminal is less than 9600 bps.
  1221. <tag/Pause after run/ After executing your commands, the
  1222. Midnight Commander can pause, so that you can examine the
  1223. output of the command. There are three possible settings
  1224. for this variable: <em/Never/ Means that you do not want to see
  1225. the output of your command. If you are using the Linux
  1226. console or an xterm, you will be able to see the output of
  1227. the command by typing <tt/C-o/. <em/"On dumb terminals"/ You will
  1228. get the pause message on terminals that are not capable of
  1229. showing the output of the last command executed (any
  1230. terminal that is not an <bf/xterm/ or the Linux console).
  1231. <em/Always/ The program will pause after executing all of your
  1232. commands.
  1233. <tag/Shell Patterns/ By default the Select, Unselect and Filter
  1234. commands will use shell-like regular expressions. The
  1235. following conversions are performed to achieve this: the
  1236. '*' is replaced by '.*' (zero or more characters); the '?'
  1237. is replaced by '.' (exactly one character) and '.' by the
  1238. literal dot. If the option is disabled, then the regular
  1239. expressions are the ones described in <bf/ed(1)/.
  1240. <tag/Auto Save Setup/ If this option is enabled, when you exit
  1241. the Midnight Commander the configurable options of the
  1242. Midnight Commander are saved in the $HOME/.mc.ini file.
  1243. <tag/Auto menus/ If this option is enabled, the user menu will
  1244. be invoked at startup. Useful for building menus for
  1245. non-unixers.
  1246. <tag/Use internal viewer/ If this option is enabled, the
  1247. built-in file viewer is used to view files. If the option
  1248. is disabled, the pager specified in the <tt/PAGER/ environment
  1249. variable is used. If no pager is specified, the <bf/view/
  1250. command is used. See the section on the <lnk name="internal file
  1251. viewer" id="Internal File Viewer">.
  1252. <tag/Confirm Delete/ This option is toggled on by default, and
  1253. will cause the Midnight Commander to ask for confirmation
  1254. when deleting a single file.
  1255. <tag/Cd follows links/ This option, if set, causes the Midnight
  1256. Commander to follow the logical chain of directories when
  1257. changing current directory either in the panels, or using
  1258. the cd command. This is the default behaviour of bash.
  1259. When unset, the Midnight Commander follows the real
  1260. directory structure, so <tt/cd ../ if you've entered that
  1261. directory through a link will move you to the current
  1262. directory's real parent and not to the directory where the
  1263. link was present.
  1264. <tag/8-bit clean/ This option allows use of 8-bit characters.
  1265. It requires that curses/ncurses be 8-bit clean. If it
  1266. isn't, things might look strange.
  1267. </descrip>
  1268.  
  1269. <sect2>Display bits<label id="Display bits">
  1270.  
  1271. <p>
  1272. This is used to configure the range of visible characters
  1273. on the screen. This setting may be 7-bits if your
  1274. terminal/curses supports only seven output bits,
  1275. ISO-8859-1 displays all the characters in the ISO-8859-1
  1276. map and full 8 bits is for those terminals that can
  1277. display full 8 bit characters.
  1278.  
  1279. <sect2>Confirmation<label id="Confirmation">
  1280.  
  1281. <p>
  1282. In this menu you configure the confirmation options for
  1283. file deletion, overwriting and quitting the program.
  1284.  
  1285. <sect2>Learn keys<label id="Learn keys">
  1286.  
  1287. <p>
  1288. This dialog lets you test if your keys F1-F20, Home, End,
  1289. etc. work properly on your terminal. They often don't,
  1290. since many terminal databases are broken.
  1291.  
  1292. You can move around with the <bf/Tab/ key, with the <tt/vi/ moving
  1293. keys ('h' left, 'j' down, 'k' up and 'l' right) and after
  1294. you press any arrow key once (this will mark it OK), then
  1295. you can use that key as well.
  1296.  
  1297. You test them just by pressing each of them. As soon as
  1298. you press a key and the key works properly, OK should
  1299. appear next to the name of that key. Once a key is marked
  1300. OK it starts to work as usually, e.g. F1 for the first
  1301. time will just check that F1 works OK, but from that time
  1302. on it will show help. The same applies to the arrow keys.
  1303. Tab key should be working always.
  1304.  
  1305. If some keys do not work properly, then you won't see OK
  1306. after the key name after you have pressed that key. You
  1307. may then want to fix it. You do it by pressing the button
  1308. of that key (either by mouse or using Tab and Enter). Then
  1309. a red message will appear and you will be asked to type
  1310. that key. If you want to abort this, press just Esc and
  1311. wait until the message disappears. Otherwise type the key
  1312. you're asked to type and also wait until the dialog
  1313. disappears.
  1314.  
  1315. When you finish with all the keys, you may want either to
  1316. Save your key fixes into your .mc.ini file into the
  1317. [terminal:TERM] section (where <tt/TERM/ is the name of your
  1318. current terminal) or to discard them. If all your keys
  1319. were working properly and you had not to fix any key, then
  1320. (of course) no saving will occur.
  1321.  
  1322. <sect2>Virtual FS<label id="Virtual FS">
  1323.  
  1324. <p>
  1325. This option gives you control over the settings of the
  1326. <lnk name="Virtual File System" id="Virtual File System"> information cache.
  1327.  
  1328. The Midnight Commander keeps in memory the information
  1329. related to some of the virtual file systems to speed up
  1330. the access to the files in the file system. Since the
  1331. information that must be kept may be large (for example,
  1332. compressed tar files may be kept in RAM for faster
  1333. access), you may want to tune the parameters of the cached
  1334. information to decrease your memory usage or to maximize
  1335. the speed of access to frequently used file systems.
  1336.  
  1337. The Tar file system is quite clever about how it handles
  1338. tar files: it just loads the directory entries and when it
  1339. needs to use the information contained in the tar file, it
  1340. goes and grab it.
  1341.  
  1342. In the wild, tar files are usually kept compressed (plain
  1343. tar files are species in extinction), and because of the
  1344. nature of those files (the directory entries for the tar
  1345. files is not there waiting for us to be loaded), the tar
  1346. file system has two choices: load the complete,
  1347. uncompressed tar file into memory or uncompress the file
  1348. in the disk in a temporary location and then access the
  1349. uncompressed file as a regular tar file.
  1350.  
  1351. In this dialog box you tell the Midnight Commander which
  1352. sizes for compressed tar files you will tolerate to load
  1353. into your precious memory. The default setting is set to
  1354. one megabyte, this means that compressed tar files whose
  1355. size is at most one megabyte will be loaded into core,
  1356. otherwise a temporary uncompressed tar file will be
  1357. created to access the contents (all of this is transparent
  1358. to the user).
  1359.  
  1360. The program will let you add a suffix to specify the units
  1361. of the number you typed in, use 'k' for kilobyte and 'm'
  1362. for megabyte. Our routine does not accept floating point
  1363. numbers, so you can't use ".5 m" to specify 512 kilobytes,
  1364. you will have to use "512 k" instead.
  1365.  
  1366. Now, since we all love to browse files and tar files all
  1367. over the disk, it's common that you will leave a tar file
  1368. and the re-enter it later. Since uncompression is slow,
  1369. the Midnight Commander will cache the information in
  1370. memory for a limited amount of time, after you hit the
  1371. timeout, all of the memory resources associated with the
  1372. file system will be freed. The default timeout is set to
  1373. one minute.
  1374.  
  1375. <sect2>Layout<label id="Layout">
  1376.  
  1377. <p>
  1378. The layout dialog gives you a possibility to change the
  1379. general layout of screen. You can specify whether the
  1380. menubar, the command prompt, the hintbar and the function
  1381. keybar are visible. On the Linux console you can specify
  1382. how many lines are shown in the output window.
  1383.  
  1384. The rest of the screen area is used for the two directory
  1385. panels. You can specify whether the area is split to the
  1386. panels in vertical or horizontal direction. The split can
  1387. be equal or you can specify an unequal split.
  1388.  
  1389. <sect2>Save Setup<label id="Save Setup">
  1390.  
  1391. <p>
  1392. At startup the Midnight Commander will try to load
  1393. initialization information from the $HOME/.mc.ini file. If
  1394. this file doesn't exist, it will load the information from
  1395. the system-wide configuration file, located in
  1396. @prefix@/lib/mc/mc.ini. If the system-wide configuration
  1397. file doesn't exist, MC uses the default settings.
  1398.  
  1399. The <em/Save Setup/ command creates the $HOME/.mc.ini file by
  1400. saving the current settings of the <lnk name="Left, Right" id="Left and Right Menus"> and
  1401. <lnk name="Options" id="Options Menu"> menus.
  1402.  
  1403. If you activate the <em/auto save setup/ option, MC will always
  1404. save the current settings when exiting.
  1405.  
  1406. There also exist settings which can't be changed from the
  1407. menus. To change these settings you have to edit the setup
  1408. file with your favorite editor. See the section on <lnk name="Special
  1409. Settings" id="Special Settings"> for more information.
  1410.  
  1411. <sect>Executing operating system commands<label id="Executing operating system commands">
  1412.  
  1413. <p>
  1414. You may execute commands by typing them directly in the
  1415. Midnight Commander's input line, or by selecting the
  1416. program you want to execute with the selection bar in one
  1417. of the panels and hitting <tt/Enter/.
  1418.  
  1419. If you press Enter over a file that is not executable, the
  1420. Midnight Commander checks the extension of the selected
  1421. file against the extensions in the <lnk name="Extensions File" id="Extension File Edit">. If a
  1422. match is found then the code associated with that
  1423. extension is executed. A very simple <lnk name="macro expansion" id="Macro Substitution">
  1424. takes place before executing the command.
  1425.  
  1426. <sect1>The cd internal command<label id="The cd internal command">
  1427.  
  1428. <p>
  1429. The <em/cd/ command is interpreted by the Midnight Commander,
  1430. it is not passed to the command shell for execution. Thus
  1431. it may not handle all of the nice macro expansion and
  1432. substition that your shell does, although it does some of
  1433. them:
  1434.  
  1435. <em/Tilde substitution/ The (˜) will be substituted with your
  1436. home directory, if you append a username after the tilde,
  1437. then it will be substituted with the login directory of
  1438. the the specified user.
  1439.  
  1440. For example, ˜guest is the home directory for the user
  1441. guest, while ˜/guest is the directory guest in your home
  1442. directory.
  1443.  
  1444. <em/Previous directory/ You can jump to the directory you were
  1445. previously by using the special directory name '-' like
  1446. this: <tt/cd -/
  1447.  
  1448. <em/CDPATH directories/ If the directory specified to the <tt/cd /
  1449. command is not in the current directory, then The Midnight
  1450. Commander uses the value in the environment variable
  1451. <tt/CDPATH/ to search for the directory in any of the named
  1452. directories.
  1453.  
  1454. For example you could set your <tt/CDPATH/ variable to
  1455. ˜/src:/usr/src, allowing you to change your directory to
  1456. any of the directories inside the ˜/src and /usr/src
  1457. directories, from any place in the file system by using
  1458. it's relative name (for example cd linux could take you to
  1459. /usr/src/linux).
  1460.  
  1461. <sect1>Macro Substitution<label id="Macro Substitution">
  1462.  
  1463. <p>
  1464. When accessing a <lnk name="user menu" id="Menu File Edit"> or executing an
  1465. <lnk name="extension dependent command" id="Extension File Edit">
  1466. or running a command from the command
  1467. line input, a simple macro substitution takes place.
  1468.  
  1469. The macros are:
  1470.  
  1471. <em/"%f"/ The current file name.
  1472.  
  1473. <em/"%d"/ The current directory name.
  1474.  
  1475. <em/"%F"/ The current file in the unselected panel.
  1476.  
  1477. <em/"%D"/ The directory name of the unselected panel.
  1478.  
  1479. <em/"%t"/ The currently tagged files.
  1480.  
  1481. <em/"%T"/ The tagged files in the unselected panel.
  1482.  
  1483. <em/"%u"/ and <em/"%U"/ Similar to the %t and %T macros, but in
  1484. addition the files are untagged. You can use this macro
  1485. only once per menu file entry or extension file entry,
  1486. because next time there will be no tagged files.
  1487.  
  1488. <em/"%s"/ and <em/"%S"/ The selected files: The tagged files if
  1489. there are any. Otherwise the current file.
  1490.  
  1491. <em/"%q"/ Dropped files. In all places except in the Drop
  1492. action of the <lnk name="mc.ext file" id="Extension File Edit">, this will become a null
  1493. string, in the Drop action it will be replaced with a
  1494. space separated list of files that were dropped on the
  1495. file.
  1496.  
  1497. <em/"%cd"/ This is a special macro that is used to change the
  1498. current directory to the directory specified in front of
  1499. it. This is used primarily as an interface to the <lnk name="Virtual
  1500. File System" id="Virtual File System">.
  1501.  
  1502. <em/"%view"/ This macro is used to invoke the internal viewer.
  1503. This macro can be used alone, or with arguments. If you
  1504. pass any arguments to this macro, they should be enclosed
  1505. in brackets. The arguments are: <em/ascii/ to force the viewer
  1506. into ascii mode; <em/hex/ to force the viewer into hex mode;
  1507. <em/nroff/ to tell the viewer that it should interpret the bold
  1508. and underline sequences of nroff; <em/unformated/ to tell the
  1509. viewer to not interpret nroff commands for making the text
  1510. bold or underlined.
  1511.  
  1512. <em/"%%"/ The % character
  1513.  
  1514. <em/"%{some text}"/ Prompt for the substitution. An input box
  1515. is shown and the text inside the braces is used as a
  1516. prompt. The macro is substituted by the text typed by the
  1517. user. The user can press ESC or F10 to cancel. This macro
  1518. doesn't work on the command line yet.
  1519.  
  1520. <sect1>The subshell support<label id="The subshell support">
  1521.  
  1522. <p>
  1523. The subshell support is a compile time option, that works
  1524. with the shells: <tt/bash/, <tt/tcsh/ and <tt/zsh/.
  1525.  
  1526. When the subshell code is activated the Midnight Commander
  1527. will spawn a concurrent copy of your shell (the one
  1528. defined in the <tt/SHELL/ variable and if it is not defined,
  1529. then the one in the /etc/passwd file) and run it in a
  1530. pseudo terminal, instead of invoking a new shell each time
  1531. you execute a command, the command will be passed to the
  1532. subshell as if you had typed it. This also allows you to
  1533. change the environment variables, use shell functions and
  1534. define aliases that are valid until you quit the Midnight
  1535. Commander.
  1536.  
  1537. If you are using <tt/bash/ you can specify startup
  1538. commands for the subshell in your ~/.mc.bashrc file and
  1539. special keyboard maps in the ~/.mc.inputrc file.
  1540. <tt/tcsh/ users may specify startup commands in the
  1541. ~/.mc.tcshrc file.
  1542.  
  1543. When the subshell code is used, you can suspend
  1544. applications at any time with the sequence C-o and jump
  1545. back to the Midnight Commander, if you interrupt an
  1546. application, you will not be able to run other external
  1547. commands until you quit the application you interrupted.
  1548.  
  1549. An extra added feature of using the subshell is that the
  1550. prompt displayed by the Midnight Commander is the same
  1551. prompt that you are currently using in your shell.
  1552.  
  1553. The <lnk name="Options" id="Options"> section has more
  1554. information on how you can control the subshell code.
  1555.  
  1556. <sect1>Controlling Midnight Commander<label id="Controlling Midnight Commander">
  1557.  
  1558. <p>
  1559. The Midnight Commander defines an environment variable
  1560. <tt/MC_CONTROL_FILE/. The commands executed by MC may give
  1561. instructions to MC by writing to the file specified by
  1562. this variable. This is only available if you compiled your
  1563. copy of the Midnight Commander with the <tt/WANT_PARSE/ option.
  1564.  
  1565. The following instructions are supported.
  1566.  
  1567. <itemize>
  1568. <item>clear_tags Clear all tags.
  1569. <item>tag <filename> Tag specified file.
  1570. <item>untag <filename> Untag specified file.
  1571. <item>select <filename> Move pointer to file.
  1572. <item>change_panel Switch between panels.
  1573. <item>cd <path> Change directory.
  1574. </itemize>
  1575.  
  1576. If the first letter of the instruction is in lower case it
  1577. operates on the current panel. If the letter is in upper
  1578. case the instruction operates on the other panel. The
  1579. additional letters must be in lower case. Instructions
  1580. must be separated by exactly one space, tab or newline.
  1581. The instructions don't work in the Info, Tree and Quick
  1582. views. The first error causes the rest to be ignored.
  1583.  
  1584. <sect>Chmod<label id="Chmod">
  1585.  
  1586. <p>
  1587. The Chmod window is used to change the attribute bits in a
  1588. group of files and directories. It can be invoked with the
  1589. <tt/C-x c/ key combination.
  1590.  
  1591. The Chmod window has two parts - <em/Permissions/ and <em/File/.
  1592.  
  1593. In the File section are displayed the name of the file or
  1594. directory and its permissions in octal form, as well as
  1595. its owner and group.
  1596.  
  1597. In the Permissions section there is a set of check buttons
  1598. which correspond to the file attribute bits. As you change
  1599. the attribute bits, you can see the octal value change in
  1600. the File section.
  1601.  
  1602. To move between the widgets (buttons and check buttons)
  1603. use the <tt/arrow keys/ or the <tt/Tab/ key. To change the state of
  1604. the check buttons or to select a button use <tt/Space/. You can
  1605. also use the hotkeys on the buttons to quickly activate
  1606. that selection (they are the highlit letters on the
  1607. buttons).
  1608.  
  1609. To set the attribute bits, use the <tt/Enter/ key.
  1610.  
  1611. When working with a group of files or directories, you
  1612. just click on the bits you want to set or clear. Once you
  1613. have selected the bits you want to change, you select one
  1614. of the action buttons (Set marked or Clear marked).
  1615.  
  1616. Finally, to set the attributes exactly to those specified,
  1617. you can use the <bf/[Set all]/ button, which will act on all
  1618. the tagged files.
  1619.  
  1620. <bf/[Marked all]/ set only marked attributes to all selected
  1621. files
  1622.  
  1623. <bf/[Set marked]/ set marked bits in attributes of all selected
  1624. files
  1625.  
  1626. <bf/[Clean marked]/ clear marked bits in attributes of all
  1627. selected files
  1628.  
  1629. <bf/[Set]/ set the attributes of one file
  1630.  
  1631. <bf/[Cancel]/ cancel the Chmod command
  1632.  
  1633. <sect>Chown<label id="Chown">
  1634.  
  1635. <p>
  1636. The Chown command is used to change the owner/group of a
  1637. file. The hot key for this command is <tt/C-x o/.
  1638.  
  1639. <sect>File Operations<label id="File Operations">
  1640.  
  1641. <p>
  1642. When you copy, move or delete files the Midnight Commander
  1643. shows the file operations dialog. It shows the files
  1644. currently being operated on and there are at most three
  1645. progress bars. The file bar tells how big part of the
  1646. current file has been copied so far. The count bar tells
  1647. how many of tagged files have been handled so far. The
  1648. bytes bar tells how big part of total size of the tagged
  1649. files has been handled so far. If the <em/verbose/ option is
  1650. off the file and bytes bars are not shown.
  1651.  
  1652. There are two buttons at the bottom of the dialog.
  1653. Pressing the <bf/Skip/ button will skip the rest of the current
  1654. file. Pressing the <bf/Abort/ button will abort the whole
  1655. operation, the rest of the files are skipped.
  1656.  
  1657. There are three other dialogs which you can run into
  1658. during the file operations.
  1659.  
  1660. The error dialog informs about error conditions and has
  1661. three choices. Normally you select either the <bf/Skip/ button
  1662. to skip the file or the <bf/Abort/ button to abort the
  1663. operation altogether. You can also select the <bf/Retry/ button
  1664. if you fixed the problem from another terminal.
  1665.  
  1666. The replace dialog is shown when you attempt to copy or
  1667. move a file on the top of an existing file. The dialog
  1668. shows the dates and sizes of the both files. Press the <bf/Yes/
  1669. button to overwrite the file, the <bf/No/ button to skip the
  1670. file, the <bf/alL/ button to overwrite all the files, the <bf/nonE/
  1671. button to never overwrite and the <bf/Update/ button to
  1672. overwrite if the source file is newer than the target
  1673. file. You can abort the whole operation by pressing the
  1674. <bf/Abort/ button.
  1675.  
  1676. The recursive delete dialog is shown when you try to
  1677. delete a directory which is not empty. Press the <bf/Yes/
  1678. button to delete the directory recursively, the <bf/No/ button
  1679. to skip the directory, the <bf/alL/ button to delete all the
  1680. directories and the <bf/nonE/ button to skip all the non-empty
  1681. directories. You can abort the whole operation by pressing
  1682. the <bf/Abort/ button.
  1683.  
  1684. If you have tagged files and perform an operation on them
  1685. only the files on which the operation succeeded are
  1686. untagged. Failed and skipped files are left tagged.
  1687.  
  1688. <sect>Mask Copy/Rename<label id="Mask Copy/Rename">
  1689.  
  1690. <p>
  1691. The copy/move operations lets you translate the names of
  1692. files in an easy way. To do it, you have to specify the
  1693. correct source mask and usually in the trailing part of
  1694. the destination specify some wildcards. All the files
  1695. matching the source mask are copied/renamed according to
  1696. the target mask. If there are tagged files, only the
  1697. tagged files matching the source mask are renamed.
  1698.  
  1699. There are other option which you can set:
  1700.  
  1701. <em/Follow symlinks/ tells whether make the symlinks in the
  1702. source directory (not recursively in subdirectories) new
  1703. symlinks in the target directory or whether would you like
  1704. to copy their content.
  1705.  
  1706. <em/Stable symlinks/ commands Midnight Commander, that it should
  1707. change symlinks in the target, so that they'll point to the same
  1708. location as it did before. With absolute symbolic links this does
  1709. nothing, but if you have a relative one, it will recompute its
  1710. value, adding necessary ../ and other directory parts and
  1711. making the value as short as possible (most modern filesystems
  1712. keep short symlinks inside inodes and thus don't vaste much disk space).
  1713.  
  1714. <em/Dive into subdirs/ tells what to do if in the target
  1715. directory exists a directory with the same name as the
  1716. file/directory being copied. The default action is to copy
  1717. it into that directory, by disabling this you can copy a
  1718. directory's content into that directory. Perhaps an
  1719. example will help:
  1720.  
  1721. You want to copy content of a directory foo to /bla/foo,
  1722. which is an already existing directory. Normally (when
  1723. Dive is set), mc would copy the content into /bla/foo/foo,
  1724. because the directory already exists. By disabling this
  1725. option you will copy it exactly into /bla/foo.
  1726.  
  1727. If you are root, you can set <em>Preserve UIDs/GIDs</em>, if you
  1728. want to get the same owner and group of new files as the
  1729. ones of the source files.
  1730.  
  1731. <bf/Use shell patterns on/
  1732.  
  1733. When the shell patterns option is on you can use the '*'
  1734. and '?' wildcards in the source mask. They work like they
  1735. do in the shell. In the target mask only the '*' and
  1736. '&bslsh;<digit>' wildcards is allowed. The first '*' wildcard in
  1737. the target mask corresponds to the first wildcard group in
  1738. the source mask, the second '*' corresponds to the second
  1739. group and so on. The '&bslsh;1' wildcard corresponds to the
  1740. first wildcard group in the source mask, the '&bslsh;2' wildcard
  1741. corresponds to the second group and so on all the way up
  1742. to '&bslsh;9'. The '&bslsh;0' wildcard is the whole filename of the
  1743. source file.
  1744.  
  1745. Two examples:
  1746.  
  1747. If the source mask is "*.tar.gz", the destination is
  1748. "/bla/*.tgz" and the file to be copied is "foo.tar.gz",
  1749. the copy will be "foo.tgz" in "/bla".
  1750.  
  1751. Let's suppose you want to swap basename and extension so
  1752. that "file.c" will become "c.file" and so on. The source
  1753. mask for this is "*.*" and the destination is "&bslsh;2.&bslsh;1".
  1754.  
  1755. <bf/Use shell patterns off/
  1756.  
  1757. When the shell patterns option is off the MC doesn't do
  1758. automatic grouping anymore. You must use '&bslsh;(...&bslsh;)'
  1759. expressions in the source mask to specify meaning for the
  1760. wildcards in the target mask. This is more flexible but
  1761. also requires more typing. Otherwise target masks are
  1762. similar to the situation when the shell patterns option is
  1763. on.
  1764.  
  1765. Two examples:
  1766.  
  1767. If the source mask is "^&bslsh;(.*&bslsh;)&bslsh;.tar&bslsh;.gz$", the destination
  1768. is "/bla/*.tgz" and the file to be copied is "foo.tar.gz",
  1769. the copy will be "/bla/foo.tgz".
  1770.  
  1771. Let's suppose you want to swap basename and extension so
  1772. that "file.c" will become "c.file" and so on. The source
  1773. mask for this is "^&bslsh;(.*&bslsh;)&bslsh;.&bslsh;(.*&bslsh;)$" and the destination is
  1774. "&bslsh;2.&bslsh;1".
  1775.  
  1776. <bf/Case Conversions/
  1777.  
  1778. You can also change the case of the filenames. If you use
  1779. '&bslsh;u' or '&bslsh;l' in the target mask the next character will be
  1780. converted to uppercase or lowercase correspondingly.
  1781.  
  1782. If you use '&bslsh;U' or '&bslsh;L' in the target mask the next
  1783. characters will be converted to uppercase or lowercase
  1784. correspondingly up to the next '&bslsh;E' or next '&bslsh;U', '&bslsh;L' or
  1785. the end of the file name.
  1786.  
  1787. The '&bslsh;u' and '&bslsh;l' are stronger than '&bslsh;U' and '&bslsh;L'.
  1788.  
  1789. For example, if the source mask is '*' (shell patterns on)
  1790. or '^&bslsh;(.*&bslsh;)$' (shell patterns off) and the target mask is
  1791. '&bslsh;L&bslsh;u*' the file names will be converted to have initial
  1792. upper case and otherwise lower case.
  1793.  
  1794. You can also use '&bslsh;' as a quote character. For example,
  1795. '&bslsh;&bslsh;' is a backslash and '&bslsh;*' is an asterisk.
  1796.  
  1797. <sect>Internal File Viewer<label id="Internal File Viewer">
  1798.  
  1799. <p>
  1800. The internal file viewer provides two display modes: ASCII
  1801. and hex. To toggle between modes, use the F4 key. If you
  1802. have the GNU gzip program installed, it will be used to
  1803. automatically decompress the files on demand.
  1804.  
  1805. The viewer will try to use the best method provided by
  1806. your system or the file type to display the information.
  1807. The internal file viewer will interpret some string
  1808. sequences to set the bold and underline attributes, thus
  1809. making a pretty display of your files.
  1810.  
  1811. When in hex mode, the search function accepts text in
  1812. quotes as well as hexadecimal constants.
  1813.  
  1814. You can mix quoted text with constants like this: <tt/"String"
  1815. 0xFE 0xBB "more text"/. Text between constants and quoted
  1816. text is just ignored.
  1817.  
  1818. Some internal details about the viewer: On systems that
  1819. provide the <bf/mmap(2)/ system call, the program maps the file
  1820. instead of loading it; if the system does not provide the
  1821. <bf/mmap(2)/ system call or the file matches an action that
  1822. requires a filter, then the viewer will use it's growing
  1823. buffers, thus loading only those parts of the file that
  1824. you actually access (this includes compressed files).
  1825.  
  1826. Here is a listing of the actions associated with each key
  1827. that the Midnight Commander handles in the internal file
  1828. viewer.
  1829.  
  1830. <descrip>
  1831. <tag/F1/ Invoke the builtin hypertext help viewer.
  1832. <tag/F2/ Toggle the wrap mode.
  1833. <tag/F4/ Toggle the hex mode.
  1834. <tag/F5/ Goto line.  This will prompt you for a line and will display
  1835. that line.
  1836. <tag>F6, /</tag> Regular expression search.
  1837. <tag>/?/ Reverse regular expression search.
  1838. <tag/F7/ Normal search / hex mode search.
  1839. <tag/C-s/ Start normal search if there was no previous search expression else
  1840. find next match.
  1841. <tag/C-r/ Start reverse search if there was no previous search expression else
  1842. find next match.
  1843. <tag/n/ Find next match.
  1844. <tag/F8/ Toggle Raw/Parsed mode: This will show the file as
  1845. found on disk or if a processing filter has been specified
  1846. in the mc.ext file, then the output from the filter.
  1847. Current mode is always the other than written on the
  1848. button label, since on the button is the mode which you
  1849. enter by that key.
  1850. <tag/F9/ Toggle the format/unformat mode: when format mode is on
  1851. the viewer will interpret some string sequences to show
  1852. bold and underline with different colors. Also, on button
  1853. label is the other mode than current.
  1854. <tag/F10, Esc/ Exit the internal file viewer.
  1855. <tag/next-page, space, C-v/ Scroll one page forward.
  1856. <tag/prev-page, M-v, C-b, backspace/ Scroll one page backward.
  1857. <tag/down-key/ Scroll one line forward.
  1858. <tag/up-key/ Scroll one line backward.
  1859. <tag/C-l/ Refresh the screen.
  1860. <tag/!/ Spawn a shell in the currently working directory.
  1861. <tag/[n&rsqb m/ Set the mark n.
  1862. <tag/[n&rsqb r/ Jump to the mark n.
  1863. <tag/C-f/ Jump to the next file.
  1864. <tag/C-b/ Jump to the previous file.
  1865. </descrip>
  1866.  
  1867. It's possible to instruct the file viewer how to display a
  1868. file, look at the <lnk name="Extension File Edit section" id="Extension File Edit">
  1869.  
  1870. <sect>Completion<label id="Completion">
  1871.  
  1872. <p>
  1873. Let the Midnight Commander type for you.
  1874.  
  1875. Attempt to perform completion on the text before current
  1876. position. MC attempts completion treating the text as
  1877. variable (if the text begins with <bf/$/ ), username (if the
  1878. text begins with <bf/˜/ ), hostname (if the text begins with <bf/@/)
  1879. or command (if you are on the command line in the
  1880. position where you might type a command, possible
  1881. completions then include shell reserved words and shell
  1882. builtin commands as well) in turn. If none of these
  1883. produces a match, filename completion is attempted.
  1884.  
  1885. Filename, username, variable and hostname completion works
  1886. on all input lines, command completion is command line
  1887. specific. If the completion is ambiguous (there are more
  1888. different possibilities), MC beeps and the following
  1889. action depends on the setting of the <em/show_all_if_ambiguous/
  1890. <lnk name="variable" id="Special Settings">
  1891. in the Initialization file. If it is nonzero, a
  1892. list of all possibilities pops up next to the current
  1893. position and you can select with the arrow keys and <tt/Enter/
  1894. the correct entry. You can also type the first letters in
  1895. which the possibilities differ to move to a subset of all
  1896. possibilities and complete as much as possible. If you
  1897. press <tt/M-Tab/ again, only the subset will be shown in the
  1898. listbox, otherwise the first item which matches all the
  1899. previous characters will be highlighted. As soon as there
  1900. is no ambiguity, dialog disappears, but you can hide it by
  1901. canceling keys <tt/Esc,/ <tt/F10/ and left and right arrow keys. If
  1902. <em/show_all_if_ambiguous/
  1903. <lnk name="variable" id="Special Settings"> is set to zero, the dialog pops up
  1904. only if you press <tt/M-Tab/ for the second time, for the first
  1905. time MC just beeps.
  1906.  
  1907. <sect>Virtual File System<label id="Virtual File System">
  1908.  
  1909. <p>
  1910. The Midnight Commander is provided with a code layer to
  1911. access the file system; this code layer is known as the
  1912. virtual file system switch. The virtual file system switch
  1913. allows the Midnight Commander to manipulate files not
  1914. located on the Unix file system.
  1915.  
  1916. Currently the Midnight Commander is packaged with five Virtual File
  1917. Systems (VFS): the <em/local/ file system, used for accessing the
  1918. regular Unix file system; the <em/ftpfs/, used to manipulate files on
  1919. remote systems with the FTP protocol; the <em/tarfs/, used to
  1920. manipulate tar and compressed tar files; the <em/undelfs/, used to
  1921. recover deleted files on et2 file systems (the default file system for
  1922. Linux systems) and finally the <em/mcfs/ (Midnight Commander file
  1923. system), a network based file system.
  1924.  
  1925. The VFS switch code will interpret all of the path names
  1926. used and will forward them to the correct file system, the
  1927. formats used for each one of the file systems is described
  1928. later in their own section.
  1929.  
  1930. <sect1>FTP File System<label id="FTP File System">
  1931.  
  1932. <p>
  1933. The ftpfs allows you to manipulate files on remote
  1934. machines, to actually use it, you may try to use the panel
  1935. command FTP link (accesible from the menubar) or you may
  1936. directly change your current directory to it using the cd
  1937. command to a path name that looks like this:
  1938.  
  1939. <em>ftp://[user@]machine[remote-dir]</em>
  1940.  
  1941. The, <em/user, port/ and <em/remote-dir/ elements are optional. If
  1942. you specify the <em/user/ element, then the Midnight Commander
  1943. will try to logon on the mremote machine as that user,
  1944. otherwise it will use your login name.
  1945.  
  1946. Examples:
  1947.  
  1948. <tscreen><verb>
  1949.     ftp://ftp.nuclecu.unam.mx/linux/local
  1950.     ftp://tsx-11.mit.edu/pub/linux/packages
  1951. </verb></tscreen>
  1952.  
  1953. The Midnight Commander keeps the directory listing in a cache.  The cache
  1954. expire time is configurable in the <lnk name="Virtual FS" id="Virtual FS"
  1955. dialog box.  This has the funny behavior that even if you make changes to a
  1956. directory, they will not be reflected in the directory listing until you
  1957. force a cache reload with the C-r key.  This is a feature (when you think
  1958. it's a bug, think about manipulating files on the other side of the Atlantic
  1959. with ftpfs).
  1960.  
  1961. <sect1>Tar File System<label id="Tar File System">
  1962.  
  1963. <p>
  1964. The tar file system provides you with read-only access to
  1965. your tar files and compressed tar files by using the chdir
  1966. command. To change your directory to a tar file, you
  1967. change your current directory to the tar file by using the
  1968. following syntax:
  1969.  
  1970. <em/tar:filename.tar[dir-inside-tar]/
  1971.  
  1972. The mc.ext file already provides a shortcut for tar files,
  1973. this means that usually you just point to a tar file and
  1974. press return to enter into the tar file, see the <lnk name="Extension
  1975. File Edit" id="Extension File Edit"> section for details on how this is done.
  1976.  
  1977. Examples:
  1978.  
  1979. <tscreen><verb>
  1980.     tar:mc-3.0.tar.gz/mc-3.0/vfs
  1981.     tar:/ftp/GCC/gcc-2.7.0.tar
  1982. </verb></tscreen>
  1983.  
  1984. The latter specifies the full path of the tar archive.
  1985.  
  1986. <sect1>Network File System<label id="Network File System">
  1987.  
  1988. <p>
  1989. The Midnight Commander file system is a network base file
  1990. system that allows you to manipulate the files in a remote
  1991. machine as if they were local. To use this, the remote
  1992. machine must be running the mcserv(8) server program.
  1993.  
  1994. To connect to a remote machine, you just need to chdir
  1995. into a special directory which name is in the following
  1996. format:
  1997.  
  1998. <em/mc:[user@]machine[:port][remote-dir]/
  1999.  
  2000. The, <em/user/, <em/port/ and <em/remote-dir/ elements are optional. If
  2001. you specify the <em/user/ element then the Midnight Commander
  2002. will try to logon on the remote machine as that user,
  2003. otherwise it will use your login name.
  2004.  
  2005. The <em/port/ element is used when the remote machine running
  2006. on a special port (see the mcserv(8) manual page for more
  2007. information about ports); finally, if the <em/remote-dir/
  2008. element is present, your current directory on the remote
  2009. machine will be set to this one.
  2010.  
  2011. Examples:
  2012.  
  2013. <tscreen><verb>
  2014.     mc:ftp.nuclecu.unam.mx/linux/local
  2015.     mc:joe@foo.edu:11321/private
  2016. </verb></tscreen>
  2017.  
  2018. <sect1>Undelete File System<label id="Undelete File System">
  2019.  
  2020. On Linux systems, if you asked configure to use the ext2fs undelete
  2021. facilities, you will have the undelete file system available.
  2022. Recovery of deleted files is only available on ext2 file systems.  The
  2023. undelete file system is just an interface to the ext2fs library to:
  2024. retrieve all of the deleted files names on an ext2fs and provides and
  2025. to extract the selected files into a regular partition.
  2026.  
  2027. To use this file system, you have to chdir into the special file name
  2028. formed by the "undel:" prefix and the file name where the actual
  2029. file system resides.
  2030.  
  2031. For example, to recover deleted files on the second partition of the
  2032. first scsi disk on Linux, you would use the following path name:
  2033.  
  2034. <tscreen><verb>
  2035.     undel:/dev/sda2
  2036. </verb></tscreen>
  2037.  
  2038. It may take a while for the undelfs to load the required information
  2039. before you start browsing files there. 
  2040.  
  2041. <sect1>Colors<label id="Colors">
  2042.  
  2043. <p>
  2044. The Midnight Commander will try to detect if your terminal
  2045. supports color using the terminal database and your
  2046. terminal name. Sometimes it gets confused, so you may
  2047. force color mode or disable color mode using the <tt/-c/ and <tt/-b/
  2048. flag respectively.
  2049.  
  2050. If the program is compiled with the Slang screen manager
  2051. instead of ncurses, it will also check the variable
  2052. <tt/COLORTERM/, if it is set, it has the same effect as the <tt/-c/
  2053. flag.
  2054.  
  2055. The program can be compiled with both ncurses and slang,
  2056. ncurses does not provide a way to force color mode:
  2057. ncurses uses just the information in the terminal
  2058. database.
  2059.  
  2060. The Midnight Commander provides a way to change the
  2061. default colors. Currently the colors are configured using
  2062. the environment variable <tt/MC_COLOR_TABLE/ or the Colors
  2063. section in the initialization file.
  2064.  
  2065. In the Colors section, the default color map is loaded
  2066. from the <em/base_color/ variable. You can specify an
  2067. alternate color map for a terminal by using the terminal
  2068. name as the key in this section. Example:
  2069.  
  2070. <tscreen><verb>
  2071. [Colors]
  2072. base_color=
  2073. xterm=menu=magenta:marked=,magenta:markselect=,red
  2074. </verb></tscreen>
  2075.  
  2076. The format for the color definition is:
  2077.  
  2078. <tscreen><verb>
  2079.   <keyword>=<foregroundcolor>,<backgroundcolor>:<keyword>= ...
  2080. </verb></tscreen>
  2081.  
  2082. The colors are optional, and the keywords are: normal,
  2083. selected, marked, markselect, errors, reverse menu,
  2084. menusel, menuhot, menuhotsel, gauge; the dialog colors
  2085. are: dnormal, dfocus, dhotnormal, dhotfocus;  Help colors
  2086. are: helpnormal, helpitalic, helpbold, helplink,
  2087. helpslink;  Viewer color is: viewunderline.
  2088.  
  2089. The dialog boxes use the following colors: <em/dnormal/ is
  2090. used for the normal text, <em/dfocus/ is the color used for the
  2091. currently selected component, <em/dhotnormal/ is the color used
  2092. to differentiate the hotkey color in normal components,
  2093. whereas the <em/dhotfocus/ color is used for the highlighted
  2094. color in the currently selected component.
  2095.  
  2096. Menus use the same scheme but uses the menu, menusel,
  2097. menuhot and menuhotsel tags instead.
  2098.  
  2099. Help uses the following colors: <em/helpnormal/ is used for
  2100. normal text, <em/helpitalic/ is used for text which is
  2101. emphasized in italic in the manual page, <em/helpbold/ is used
  2102. for text which is emphasized in bold in the manual page,
  2103. <em/helplink/ is used for not selected hyperlinks and <em/helpslink/
  2104. is used for selected hyperlink.
  2105.  
  2106. <em/gauge/ determines color of filled part of the progress bar
  2107. (gauge), which shows how many percent of files were copied
  2108. etc. in a graphical way.
  2109.  
  2110. The possible colors are: black, red, green, brightgreen,
  2111. brown, yellow, blue, brightblue, magenta, brightmagenta,
  2112. cyan, brightcyan, lightgray and white.
  2113.  
  2114. If you are setting the colors from your private setup, you
  2115. could use this format:
  2116.  
  2117. <tscreen><verb>
  2118. colors=menu=magenta:marked=,magenta:markselect=,red
  2119. </verb></tscreen>
  2120.  
  2121. <sect>Special Settings<label id="Special Settings">
  2122.  
  2123. <p>
  2124. Most of the settings of the Midnight Commander can be
  2125. changed from the menus. However, there is a small number
  2126. of settings which can only be changed by editing the setup
  2127. file.
  2128.  
  2129. These variables may be set in your $HOME/.mc.ini file:
  2130.  
  2131. <descrip>
  2132. <tag/clear_before_exec/ By default the Midnight Commander
  2133. clears the screen before executing a command. If you would
  2134. prefer to see the output of the command at the bottom of
  2135. the screen, edit your ˜/mc.ini file and change the value
  2136. of the field clear_before_exec to 0.
  2137. <tag/confirm_view_dir/ If you press <tt/F3/ on a directory, normally
  2138. MC enters that directory. If this flag is set to 1, then
  2139. MC will ask for confirmation before changing the directory
  2140. if you have files tagged.
  2141. <tag/drop_menus/ If this variable is set, when you press the <tt/F9/
  2142. key, the pull down menus will be activated, else, you will
  2143. only be presented with the menu title, and you will have
  2144. to select the entry with the arrow keys or the first
  2145. letter and from there select your option in the menu.
  2146.  
  2147. <tag/ftpfs_retry_seconds/
  2148. This value is the number of seconds the Midnight Commander will wait
  2149. before attempting a reconnection to an ftp server that has denied the
  2150. login.  If the value is zero, the the program will not retry the login.
  2151.  
  2152. <tag/max_dirt_limit/ Specifies how many screen updates can be
  2153. skipped at most in the internal file viewer. Normally this
  2154. value is not significant, because the code automatically
  2155. adjusts the number of updates to skip according to the
  2156. rate of incoming keypresses. However, on very slow
  2157. machines or terminals with a fast keyboard auto repeat, a
  2158. big value can make screen updates too jumpy. It seems that
  2159. setting max_dirt_limit to 10 causes the best behavior, and
  2160. that is the default value.
  2161. <tag/mouse_move_pages/ Controls whenever scrolling with the
  2162. mouse is done by pages or line by line on the panels.
  2163. <tag/mouse_move_pages_viewer/ Controls if scrolling with the
  2164. mouse is done by pages or line by line on the internal
  2165. file viewer.
  2166. <tag/navigate_with_arrows/ If this setting is turned on, then
  2167. you may use the arrows keys to automatically chdir if the
  2168. current selection is a subdirectory and the shell command
  2169. line is empty. By default, this setting is off.
  2170. <tag/nice_rotating_dash/ When on, this flag causes the commander
  2171. to show a rotating dash as a work in progress indicator.
  2172. <tag/old_esc_mode/ By default the Midnight Commander treats the
  2173. <tt/ESC/ key as a key prefix (old_esc_mode=0), if you set this
  2174. option (old_esc_mode=1), then the <tt/ESC/ key will act as a
  2175. prefix key for one second, and if no extra keys have
  2176. arrived, then the <tt/ESC/ key is interpreted as a cancel key
  2177. (<tt/ESC ESC/).
  2178. <tag/only_leading_plus_minus/
  2179. set special treatment for '+', '-', '*' in command line (select,
  2180. unselect, reverse selection) only if command line is empty. No need to
  2181. qoute this characters in the middle of the command line. But we can not
  2182. change selection when command line is not empty.
  2183. <tag/panel_scroll_pages/
  2184. If set (the default), panel will scroll by half the display when the
  2185. cursor reaches the end or the beginning of the panel, otherwise it
  2186. will just scroll a file at a time.
  2187. <tag/preserve_uidgid/
  2188. If this option is set (the default), when logged in as root the
  2189. default will be to preserve the UID and the GID of files.  Some users
  2190. prefer to disable this option, so that's why it's configurable.
  2191. <tag/show_output_starts_shell/ 
  2192. This variable only works if you are not using the subshell support.
  2193. When you use the C-o keystroke to go back to the user screen, if this
  2194. one is set, you will get a fresh shell.  Otherwise, pressing any key
  2195. will bring you back to the Midnight Commander.
  2196. <tag/show_all_if_ambiguous/ By default the Midnight Commander
  2197. pops up all possible <lnk name="completions" id="Completion"> if the completion is
  2198. ambiguous if you press <tt/M-Tab/ for the second time, for the
  2199. first time it just completes as much as possible and in
  2200. the case of ambiguity beeps. If you want to see all the
  2201. possible completions already after the first <tt/M-Tab/
  2202. pressing, set this option to 1.
  2203. <tag/torben_fj_mode/ If this flag is set, then the home and end
  2204. keys will work slightly different on the panels, instead
  2205. of moving the selection to the first and last files in the
  2206. panels, they will act as follows: The home key will: Go up
  2207. to the middle line, if below it; else go to the top line
  2208. unless it is already on the top line, in this case it will
  2209. go to the first file in the panel. The end key has a
  2210. similar behavior: Go down to the middle line, if over it;
  2211. else go to the bottom line unless you already are at the
  2212. bottom line, in such case it will move the selection to
  2213. the last file name in the panel.
  2214. <tag/use_file_to_guess_type/ If this variable is on (the
  2215. default) it will spawn the file command to match the file
  2216. types listed on the <lnk name="mc.ext file" id="Extension File Edit">.
  2217. <tag/xterm_mode/If this variable is on (default is off) when you browse the file
  2218. system on a Tree panel, it will automatically reload the other panel
  2219. with the contents of the selected directory.
  2220. </descrip>
  2221.  
  2222. <sect>Terminal databases<label id="Terminal databases">
  2223.  
  2224. <p>
  2225. The Midnight Commander provides a way to fix your system
  2226. terminal database without requiring root privileges. The
  2227. Midnight Commander searches in the system initialization
  2228. file (the mc.lib file located in the Midnight Commander
  2229. library directory) or in the $HOME/.mc.ini file for the
  2230. section "terminal:your-terminal-name" and then for the
  2231. section "terminal:general", each line of the section
  2232. contains a key symbol that you want to define, followed by
  2233. an equal sign and the definition for the key. You can use
  2234. the special &bslsh;E form to represent the escape character and
  2235. the ^x to represent the control-x character.
  2236.  
  2237. The possible key symbols are:
  2238.  
  2239. <tscreen><verb>
  2240. f0 to f20     Function keys f0-f20
  2241. bs          backspace
  2242. home          home key
  2243. end           end key
  2244. up            up arrow key
  2245. down          down arrow key
  2246. left          left arrow key
  2247. right         right arrow key
  2248. pgdn          page down key
  2249. pgup          page up key
  2250. insert        the insert character
  2251. delete        the delete character
  2252. complete      to do completion
  2253. </verb></tscreen>
  2254.  
  2255. For example, to define the key insert to be the
  2256. <tt/Escape + [ + O + p/, you set this in the ini file:
  2257.  
  2258. <tscreen><verb>
  2259. insert=&bslshv;E[Op
  2260. </verb></tscreen>
  2261.  
  2262. The <em/complete/ key symbol represents the escape sequences
  2263. used to invoke the completion process, this is invoked
  2264. with <tt/M-tab/, but you can define other keys to do the same
  2265. work (on those keyboard with tons of nice and unused keys
  2266. everywhere).
  2267.  
  2268. <sect>How to use help<label id="How to use help">
  2269.  
  2270. <p>
  2271. You can use the cursor keys or mouse to navigate in the
  2272. help viewer.
  2273.  
  2274. Press down arrow to move to the next item or scroll down.
  2275. Press up arrow to move to the previous item or scroll up.
  2276. Press right arrow to follow the current link.
  2277. Press left arrow to go back in the history of nodes that
  2278. you have visited.
  2279.  
  2280. If you terminal doesn't support the cursor keys you can
  2281. use the <tt/space bar/ to scroll forward and the <tt/b/ key scroll
  2282. back. Use the <tt/TAB/ key to move to the next item and press
  2283. <tt/ENTER/ to follow the current link. The <tt/l/ (last) key may
  2284. be used to go back in the history of nodes that you have
  2285. visited. Press <tt/ESC/ to exit the help viewer.
  2286.  
  2287. The left mouse button will follow the link or scroll. The
  2288. right mouse button can be used to go back in the history
  2289. of nodes.
  2290.  
  2291. The full key list of the help viewer:
  2292.  
  2293. <lnk name="General movement keys" id="General Movement Keys"> are accepted.
  2294.  
  2295. <descrip>
  2296. <tag/tab/Move to the next item.
  2297. <tag/M-tab/Move to the previous item.
  2298. <tag/down/Move to the next item or scroll a line down.
  2299. <tag/up/Move to the previous item or scroll a line up.
  2300. <tag/right, enter/Follow the current link.
  2301. <tag/left, l/Go back in the history of visited nodes.
  2302. <tag/F1/Show the help for the help viewer.
  2303. <tag/n/Go to the next node.
  2304. <tag/p/Go to the previous node.
  2305. <tag/c/Go to the Contents node.
  2306. <tag/F10, esc/Exit the help viewer.
  2307. </descrip>
  2308.  
  2309. <sect>FILES<label id="FILES">
  2310.  
  2311. <p>
  2312. <descrip>
  2313. <tag>@prefix@/lib/mc.hlp</tag> The help file for the program.
  2314. <tag>@prefix@/lib/mc/mc.ext</tag> The default system-wide extensions
  2315. file.
  2316. <tag>$HOME/.mc.ext</tag> User's own extension, view configuration and
  2317. edit configuration file. They override the contents of the
  2318. system wide files if present.
  2319. <tag>@prefix@/lib/mc/mc.ini</tag> The default system-wide setup for
  2320. the Midnight Commander, used only if the user lacks his
  2321. own ˜/.mc.ini file.
  2322. <tag>@prefix@/lib/mc/mc.lib</tag> Global settings for the Midnight
  2323. Commander. Settings in this file are global to any
  2324. Midnight Commander, it is useful to define site-global
  2325. terminal settings.
  2326. <tag>$HOME/.mc.ini</tag> User's own setup. If this file is present
  2327. then the setup is loaded from here instead of the
  2328. system-wide startup file.
  2329. <tag>@prefix@/lib/mc/mc.hint</tag> This file contains the hints
  2330. (cookies) displayed by the program.
  2331. <tag>@prefix@/lib/mc/mc.menu</tag> This file contains the default
  2332. system-wide applications menu.
  2333. <tag>$HOME/.mc.menu</tag> User's own application menu. If this file
  2334. is present it is used instead of the system-wide
  2335. applications menu.
  2336. <tag>$HOME/.mc.tree</tag> The directory list for the directory tree
  2337. and tree view features. Each line is one entry. The lines
  2338. starting with a slash are full directory names. The lines
  2339. starting with a number have that many characters equal to
  2340. the previous directory. If you want you may create this
  2341. file by giving the command
  2342.  
  2343. <tscreen><verb> 
  2344. find / -type d -print | sort < ~/.mc.tree
  2345. </verb></tscreen>
  2346.  
  2347. Normally there is no sense in doing it
  2348. because the Midnight Commander automatically updates this
  2349. file for you.
  2350. </descrip>
  2351.  
  2352. <sect>AVAILABILITY<label id="AVAILABILITY">
  2353.  
  2354. <p>
  2355. The latest version of this program can be found at
  2356. <url url="ftp://ftp.nuclecu.unam.mx/linux/local/"> and in
  2357. Europe from <url url="ftp://ftp.cvut.cz/pub/mc">.
  2358.  
  2359. <sect>SEE ALSO<label id="SEE ALSO">
  2360.  
  2361. <p>
  2362. <bf/ed(1), gpm(1), mcserv(8), terminfo(1), view(1), sh(1),
  2363. bash(1), tcsh(1), zsh(1)/.
  2364.  
  2365. The Midnight Commander page on the World Wide Web:
  2366. <url url="http://stekt.oulu.fi/~jtklehto/mc/">
  2367.  
  2368. <sect>AUTHORS<label id="AUTHORS">
  2369.  
  2370. <p>
  2371. <itemize>
  2372. <item>Miguel de Icaza (<tt/miguel@roxanne.nuclecu.unam.mx/)
  2373. <item>Janne Kukonlehto (<tt/jtklehto@paju.oulu.fi/)
  2374. <item>Radek Doulik (<tt/rodo@earn.cvut.cz/)
  2375. <item>Fred Leeflang (<tt/fredl@nebula.ow.org/)
  2376. <item>Dugan Porter (<tt/dugan@b011.eunet.es/)
  2377. <item>Jakub Jelinek (<tt/jj@sunsite.mff.cuni.cz/)
  2378. <item>Ching Hui (<tt/u811563@Oz.nthu.edu.tw/)
  2379. <item>Mauricio Plaza (<tt/mok@roxanne.nuclecu.unam.mx/)
  2380. </itemize>
  2381.  
  2382. Alessandro Rubini (<tt/rubini@ipvvis.unipv.it/) has been especially helpful
  2383. debugging and enhancing the program's mouse support, John
  2384. Davis (<tt/davis@space.mit.edu/) made his S-Lang library
  2385. available to us under the GPL and answered my questions
  2386. about it, and the following people have contributed code
  2387. and many bug fixes (in alphabetical order):
  2388.  
  2389. <itemize>
  2390. <item>Adam Tla/lka (<tt/atlka@sunrise.pg.gda.pl/)
  2391. <item>Antonio Palama, DOS port (<tt/palama@posso.dm.unipi.it/)
  2392. <item>Gerd Knorr (<tt/kraxel@cs.tu-berlin.de.)
  2393. <item>Erwin van Eijk (<tt/wabbit@corner.iaf.nl/)
  2394. <item>Jean-Daniel Luiset (<tt/luiset@cih.hcuge.ch/)
  2395. <item>Jon Stevens (<tt/root@dolphin.csudh.edu/)
  2396. <item>Juan Jose Ciarlante (<tt/jjciarla@raiz.uncu.edu.ar/)
  2397. <item>Ilya Rybkin (<tt/rybkin@rouge.phys.lsu.edu/)
  2398. <item>Marcelo Roccasalva (<tt/mfroccas@raiz.uncu.edu.ar/)
  2399. <item>Massimo Fontanelli (<tt/MC8737@mclink.it/)
  2400. <item>Sergey Ya. Korshunoff (<tt/root@seyko.msk.su/)
  2401. <item>Thomas Pundt (<tt/pundtt@math.uni-muenster.de/)
  2402. <item>Torben Fjerdingstad (<tt/tfj@olivia.ping.dk/)
  2403. <item>Vadim Sinolitis (<tt/vvs@nsrd.npi.msu.su/)
  2404. <item>Wim Osterholt (<tt/wim@djo.wtm.tudelft.nl/)
  2405. </itemize>
  2406.  
  2407. <sect>BUGS<label id="BUGS">
  2408.  
  2409. <p>
  2410. See the file TODO in the distribution for information on
  2411. what remains to be done.
  2412.  
  2413. </article>
  2414.